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) include(VendorConfig) # Libraries find_package(Qt5 5.11.0 COMPONENTS Core Widgets WebEngineWidgets REQUIRED) find_package(Boost 1.66 COMPONENTS program_options REQUIRED) 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(CONFIG_USEPLASMA) if(CONFIG_USEBREAKPAD) find_package(Threads REQUIRED) add_subdirectory(3rd-party/breakpad) endif(CONFIG_USEBREAKPAD) # Global C++ settings set(CMAKE_CXX_STANDARD 17) # 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) add_subdirectory(lib/about) add_subdirectory(lib/addressbar) add_subdirectory(lib/bookmarks) add_subdirectory(lib/downloads) add_subdirectory(lib/configuration) add_subdirectory(lib/web) add_subdirectory(lib/urlfilter) add_subdirectory(plugins/ProfileEditor) add_subdirectory(plugins/ConfigurationEditor) add_subdirectory(src) if(CONFIG_TESTS) enable_testing() find_package(Qt5 COMPONENTS Test REQUIRED) add_subdirectory(test) endif(CONFIG_TESTS) # Summarize message(STATUS "=== Configuration summary ===") 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)