aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt48
1 files changed, 25 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51983e3..074e736 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,47 +3,49 @@ project(smolbote)
include(FeatureSummary)
-set(VENDOR "${CMAKE_SOURCE_DIR}/vendor.cmake" CACHE FILEPATH "vendor configuration path")
-include(${VENDOR})
-
# Options
-option(QtDeprecatedWarnings "Qt deprecated warnings" ON)
-option(UseLibCpp "Use libc++ over stdlibc++ (requires clang)" OFF)
-option(Tests "Enable/disable some basic autotests" OFF)
-option(Plasma "Enable Plasma integration" OFF)
-option(Breakpad "Enable breakpad crash reports" OFF)
+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})
# Libraries
-find_package(Qt5 COMPONENTS Core Widgets Concurrent REQUIRED)
-find_package(Qt5 5.11.0 COMPONENTS WebEngineWidgets REQUIRED)
+find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED)
find_package(Boost 1.66 COMPONENTS program_options REQUIRED)
-if(Plasma)
+if(Feature_Plasma)
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(Plasma)
+endif(Feature_Plasma)
+
+if(Feature_Breakpad)
+ find_package(Threads REQUIRED)
+ add_subdirectory(3rd-party/breakpad)
+endif(Feature_Breakpad)
# Global C++ settings
set(CMAKE_CXX_STANDARD 17)
-if(QtDeprecatedWarnings)
+if(Devel_QtDeprecated)
add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900)
-endif(QtDeprecatedWarnings)
+endif(Devel_QtDeprecated)
# link to libc++
-if (UseLibCpp)
+if (Feature_ClangLibCpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
-endif (UseLibCpp)
+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")
add_subdirectory(3rd-party/SingleApplication)
-if(Breakpad)
- add_subdirectory(3rd-party/breakpad)
-endif()
add_subdirectory(lib/about)
add_subdirectory(lib/addressbar)
@@ -59,17 +61,17 @@ add_subdirectory(plugins/ConfigurationEditor)
# browser source code
add_subdirectory(src)
-if (Tests)
+if(Devel_Tests)
enable_testing()
find_package(Qt5 COMPONENTS Test REQUIRED)
add_subdirectory(test)
-endif()
+endif(Devel_Tests)
# Summarize
message(STATUS "=== Configuration summary ===")
-message(STATUS "Building ${poi_exe} ${VerTag}; version ${VerDescribe} ${VerBranch}:${VerCommit}")
-message(STATUS "vendor.cmake: ${VENDOR}")
+message(STATUS "Building ${poi_exe} ${poi_Build}")
+message(STATUS "vendor.cmake: ${Vendor}")
message(STATUS "Platform: ${CMAKE_SYSTEM_NAME}")
message(STATUS "Generator: ${CMAKE_GENERATOR}")