summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: ee184c79caf55485e55e79e4163250f9343a84d1 (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
# rekonq project
# Andrea Diamantini - adjam7 at gmail dot com

# ==================================================================================
cmake_minimum_required(VERSION 3.23.3)
project(rekonq
        VERSION 3.0.0
        HOMEPAGE_URL https://bitbucket.org/celestriad/rekonq
        LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)

# ==================================================================================
# Information to update before to release this package.

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config-version.h )
set(CMAKE_INCLUDE_CURRENT_DIR ON)
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)

#FIND_PACKAGE(KDE4 4.8.4 REQUIRED)


#INCLUDE(MacroOptionalFindPackage)
#INCLUDE(FindPackageHandleStandardArgs)
#INCLUDE(KDE4Defaults)
#INCLUDE(MacroLibrary)

ADD_DEFINITIONS(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)

option(TESTING "Enable tests" OFF)
if(TESTING)
    include(CTest)
    enable_testing()
    find_package(GTest REQUIRED)
    add_definitions(-DREKONQ_TEST_EXPORT)
endif()

# ==================================================================================
# third-party requirements
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 )

# ==================================================================================
# Log messages

MESSAGE(STATUS "")
MESSAGE(STATUS "-----------------------------------------------------------------------")
MESSAGE(STATUS " rekonq ${CMAKE_PROJECT_VERSION} dependencies results  <${CMAKE_PROJECT_HOMEPAGE_URL}>")
MESSAGE(STATUS "")

feature_summary(WHAT ALL)

# Require shared libraries results.

# ===============================================================================


    ADD_SUBDIRECTORY( src )
    ADD_SUBDIRECTORY( icons )
add_subdirectory(plugins/webengine)


# ================================================================================

# 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