diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-15 07:32:44 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-15 07:41:45 +0200 |
commit | c31a89a3b56e7d081178e09cc58add5c5b84a91a (patch) | |
tree | 4b547f0c347679fa6b3f118f1ba6a231c58010f1 /CMakeLists.txt | |
parent | Update CMakeLists option names (diff) | |
download | smolbote-c31a89a3b56e7d081178e09cc58add5c5b84a91a.tar.xz |
Rewrite vendor.cmake to cmake/VendorConfig.cmake
Add menuconfig-editable .config files to platforms.
VendorConfig.cmake looks for and includes .config files based on
platform name.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 074e736..f959a8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,47 +1,29 @@ cmake_minimum_required(VERSION 3.10.0) project(smolbote) +# add cmake/ to module path +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) include(FeatureSummary) - -# Options -option(Feature_ClangLibCpp "Use libc++ over stdlibc++" OFF) -option(Feature_Plasma "Enable Plasma integration" OFF) -option(Feature_Breakpad "Enable Breakpad crash reports" OFF) - -option(Devel_QtDeprecated "Enable Qt deprecation warnings" ON) -option(Devel_Tests "Enable automatic testing" OFF) - -set(Vendor "${CMAKE_SOURCE_DIR}/vendor.cmake" CACHE FILEPATH "vendor configuration path") -include(${Vendor}) +include(VendorConfig) # Libraries find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED) find_package(Boost 1.66 COMPONENTS program_options REQUIRED) -if(Feature_Plasma) +if(CONFIG_USEPLASMA) find_package(ECM 1.6.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) find_package(KF5 "5.6.0" COMPONENTS Wallet WindowSystem REQUIRED) -endif(Feature_Plasma) +endif(CONFIG_USEPLASMA) -if(Feature_Breakpad) +if(CONFIG_USEBREAKPAD) find_package(Threads REQUIRED) add_subdirectory(3rd-party/breakpad) -endif(Feature_Breakpad) +endif(CONFIG_USEBREAKPAD) # Global C++ settings set(CMAKE_CXX_STANDARD 17) -if(Devel_QtDeprecated) - add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900) -endif(Devel_QtDeprecated) - -# link to libc++ -if (Feature_ClangLibCpp) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") -endif (Feature_ClangLibCpp) - # configure a header file to pass version information configure_file("${PROJECT_SOURCE_DIR}/src/version.h.in" "${PROJECT_BINARY_DIR}/src/version.h") @@ -58,26 +40,23 @@ add_subdirectory(lib/urlfilter) add_subdirectory(plugins/ProfileEditor) add_subdirectory(plugins/ConfigurationEditor) -# browser source code add_subdirectory(src) -if(Devel_Tests) +if(CONFIG_TESTS) enable_testing() find_package(Qt5 COMPONENTS Test REQUIRED) add_subdirectory(test) -endif(Devel_Tests) +endif(CONFIG_TESTS) # Summarize message(STATUS "=== Configuration summary ===") - -message(STATUS "Building ${poi_exe} ${poi_Build}") -message(STATUS "vendor.cmake: ${Vendor}") - +message(STATUS "Building ${CONFIG_POI_NAME} (${CONFIG_POI_EXE}) ${poi_Build}") message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}") message(STATUS "Generator: ${CMAKE_GENERATOR}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "CXX compiler: ${CMAKE_CXX_COMPILER_ID}") message(STATUS "CXX flags: ${CMAKE_CXX_FLAGS}") +message(STATUS "CXX flags dbg: ${CMAKE_CXX_FLAGS_DEBUG}") +message(STATUS "CXX flags rel: ${CMAKE_CXX_FLAGS_RELEASE}") feature_summary(WHAT ALL) - |