# rekonq project # Andrea Diamantini - adjam7 at gmail dot com # ================================================================================== # Information to update before release cmake_minimum_required(VERSION 3.21) project(rekonq LANGUAGES CXX VERSION 3.0.0 HOMEPAGE_URL https://bitbucket.org/celestriad/rekonq) # ================================================================================== # dependencies set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) include(FeatureSummary) include(GNUInstallDirs) find_package(Qt6 6.3.0 COMPONENTS Core Gui Network WebEngineWidgets REQUIRED) # turn on automatic moc/uic/rcc for all targets set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) #ADD_DEFINITIONS(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") include(CTest) enable_testing() add_custom_target(test_memcheck COMMAND ${CMAKE_CTEST_COMMAND} -T memcheck WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) find_package(GTest REQUIRED) add_definitions(-DREKONQ_TEST_EXPORT) endif() option(BUILD_COVERAGE "Enable coverage" OFF) if(${BUILD_COVERAGE}) include(CodeCoverage) append_coverage_compiler_flags() set(COVERAGE_EXCLUDES ${CMAKE_BINARY_DIR}/* /usr/include/*) message(STATUS "coverage excludes: ${COVERAGE_EXCLUDES}") # create coverage target, using ctest to run all tests setup_target_for_coverage_lcov(NAME test_coverage EXECUTABLE ${CMAKE_CTEST_COMMAND}) endif() # ================================================================================== # third-party dependencies set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") add_subdirectory(third-party/SingleApplication) # ================================================================================== # optional nepomuk requirements if(WITH_NEPOMUK) FIND_PACKAGE(Soprano) FIND_PACKAGE(NepomukCore 0.1.0) endif() IF(SOPRANO_FOUND AND NepomukCore_FOUND) ADD_DEFINITIONS(-DHAVE_NEPOMUK) ENDIF(SOPRANO_FOUND AND NepomukCore_FOUND) # ================================================================================== # optional QCA2 & QtOAuth requirements #MACRO_OPTIONAL_FIND_PACKAGE(QCA2) #MACRO_BOOL_TO_01(QCA2_FOUND HAVE_QCA2) #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-qca2.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-qca2.h ) #MACRO_OPTIONAL_FIND_PACKAGE(QtOAuth) #MACRO_BOOL_TO_01(QTOAUTH_FOUND HAVE_QTOAUTH) #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-qtoauth.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-qtoauth.h ) # ================================================================================== # optional KActivities requirements #MACRO_OPTIONAL_FIND_PACKAGE(KActivities 6.1.0) #MACRO_BOOL_TO_01(KActivities_FOUND HAVE_KACTIVITIES) #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-kactivities.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-kactivities.h ) # ================================================================================== # configure files configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-version.h.cmake config-version.h) # ================================================================================== # includes for all targets include_directories(include) # ================================================================================== # Log messages MESSAGE(STATUS "-----------------------------------------------------------------------") MESSAGE(STATUS " rekonq ${CMAKE_PROJECT_VERSION} <${CMAKE_PROJECT_HOMEPAGE_URL}>") message(STATUS " Build type: ${CMAKE_BUILD_TYPE}") message(STATUS " CXX flags: ${CMAKE_CXX_FLAGS}") MESSAGE(STATUS "") feature_summary(WHAT ALL) # =============================================================================== #ADD_SUBDIRECTORY( icons ) add_subdirectory(plugins/webengine) add_subdirectory(src) add_executable(rekonq ${rekonq_SRCS}) target_include_directories(rekonq PRIVATE src) target_link_libraries(rekonq Qt6::Widgets SingleApplication::SingleApplication pluginloader ) add_custom_target(rekonq_check_license python scripts/check_license.py ${rekonq_SRCS} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) # ================================================================================ # doc & translations #set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1) # Do not remove or modify these. # The release script substitutes in for these comments with appropriate doc and translation directories. #PO_SUBDIR #DOC_SUBDIR