cmake_minimum_required(VERSION 3.10.0) project(smolbote CXX) 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 some fancy effects on Plasma" OFF) # Libraries find_package(Qt5 COMPONENTS Core Widgets Concurrent REQUIRED) find_package(Qt5 5.11.0 COMPONENTS WebEngineWidgets REQUIRED) find_package(Boost 1.66 COMPONENTS program_options REQUIRED) if(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 WindowSystem REQUIRED) endif(Plasma) # Global C++ settings set(CMAKE_CXX_STANDARD 17) if(QtDeprecatedWarnings) add_definitions(-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050900) endif(QtDeprecatedWarnings) # link to libc++ if (UseLibCpp) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") endif (UseLibCpp) # 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(plugins/ProfileEditor) add_subdirectory(plugins/ConfigurationEditor) # browser source code add_subdirectory(src) if (Tests) enable_testing() find_package(Qt5 COMPONENTS Test REQUIRED) add_subdirectory(test) endif() # Summarize message(STATUS "=== Configuration summary ===") message(STATUS "Building ${poi_NAME} ${VerTag}; version ${VerDescribe} ${VerBranch}:${VerCommit}") message(STATUS "vendor.cmake: ${VENDOR}") 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}") feature_summary(WHAT ALL)