blob: 4e1a43b385584c26e950a8af19f0474445c768f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# 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(spdlog REQUIRED)
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)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# ==================================================================================
# 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}
include/rview.hpp)
target_include_directories(rekonq PRIVATE src)
target_link_libraries(rekonq
spdlog::spdlog Qt6::Widgets SingleApplication::SingleApplication
settings 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
|