The complete source code of IdealIRC
http://www.idealirc.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.3 KiB
91 lines
2.3 KiB
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(IdealIRC)
|
|
|
|
#
|
|
# Versioning
|
|
#
|
|
set(BUILD_TYPE "packaged")
|
|
set(VERSION_MAJOR 1)
|
|
set(VERSION_MINOR 1)
|
|
set(VERSION_PATCH 0)
|
|
set(VERSION_APPEND "")
|
|
|
|
#
|
|
# CMake build environment setup
|
|
#
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
include(CMake/Git.cmake)
|
|
include(CMake/config_h_warning.cmake)
|
|
|
|
set(IIRC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
include_directories(${IIRC_SOURCE_DIR})
|
|
include_directories(${IIRC_SOURCE_DIR}/IdealIRC)
|
|
include_directories(${CMAKE_BINARY_DIR})
|
|
|
|
option(BUILD_DEV_STUFF "Build additional development stuff" OFF)
|
|
|
|
#
|
|
# Additional paths
|
|
#
|
|
set(IIRC_DEP_INCLUDE "" CACHE PATH "Additional include path (single path only)")
|
|
set(IIRC_DEP_LIBRARY "" CACHE PATH "Additional library path (single path only)")
|
|
if (NOT IIRC_DEP_INCLUDE STREQUAL "")
|
|
include_directories(${IIRC_DEP_INCLUDE})
|
|
message("Using additional include path: ${IIRC_DEP_INCLUDE}")
|
|
endif()
|
|
if (NOT IIRC_DEP_LIBRARY STREQUAL "")
|
|
link_directories(${IIRC_DEP_LIBRARY})
|
|
message("Using additional library path: ${IIRC_DEP_LIBRARY}")
|
|
endif()
|
|
|
|
# For GCC and Clang, basically.
|
|
if (UNIX)
|
|
# set(CMAKE_CXX_FLAGS "-Wall -Werror")
|
|
set(CMAKE_CXX_FLAGS "-pthread")
|
|
|
|
#
|
|
# Remove warnings about deprecated stuff.
|
|
# In order to change a statement using a deprecated API, it has to be investigated what it would affect.
|
|
# It is safe to temporarily disable this during development but should be enabled for release and test builds.
|
|
#
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
|
|
endif()
|
|
|
|
|
|
#
|
|
# Qt setup
|
|
#
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
|
|
|
#
|
|
# Project setup
|
|
#
|
|
configure_file(config.h.in ${CMAKE_BINARY_DIR}/config.h @ONLY)
|
|
|
|
set(IIRC_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
|
|
|
message("IdealIRC version ${IIRC_VERSION}")
|
|
message("Git branch: ${GIT_BRANCH}")
|
|
message("Git commit: ${GIT_COMMIT_HASH}")
|
|
|
|
add_subdirectory(Resources)
|
|
add_subdirectory(ICommand)
|
|
add_subdirectory(IConfig)
|
|
add_subdirectory(IRCClient)
|
|
add_subdirectory(IWin)
|
|
add_subdirectory(Script)
|
|
add_subdirectory(ScriptDialog)
|
|
add_subdirectory(ScriptFunctions)
|
|
add_subdirectory(Widgets)
|
|
add_subdirectory(NATUtils)
|
|
add_subdirectory(IdealIRC) # This one builds the binary.
|
|
|
|
if (BUILD_DEV_STUFF)
|
|
add_subdirectory(IRCClientSandbox)
|
|
endif()
|
|
|