-
Notifications
You must be signed in to change notification settings - Fork 42
/
CMakeLists.txt
59 lines (54 loc) · 2.4 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.16)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/VersionInfo.cmake)
message(FATAL_ERROR "cmake submodule directory empty, did you 'git clone --recursive'?")
endif()
project(qdigidoc4 VERSION 4.7.0)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
include( GNUInstallDirs )
include( VersionInfo )
find_package(LibDigiDocpp 4.1.0 REQUIRED)
find_package( LDAP REQUIRED )
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.12.0 REQUIRED COMPONENTS Core Widgets Network PrintSupport Svg LinguistTools)
find_package(FlatBuffers CONFIG REQUIRED NAMES FlatBuffers Flatbuffers)
find_package(ZLIB REQUIRED)
set_env( TSL_URL "https://ec.europa.eu/tools/lotl/eu-lotl.xml" CACHE STRING "TSL trust list primary URL" )
set_env( TSL_INCLUDE "EE" CACHE STRING "TSL list include in binary" )
set_env(CDOC2_GET_URL "https://cdoc2-keyserver-get" CACHE STRING "CDoc 2.0 Key Server get URL")
set_env(CDOC2_POST_URL "https://cdoc2-keyserver-post" CACHE STRING "CDoc 2.0 Key Server post URL")
set_env( MOBILEID_URL "https://dd-mid.ria.ee/mid-api" CACHE STRING "URL for Mobile-ID" )
set_env( SMARTID_URL "https://dd-sid.ria.ee/v1" CACHE STRING "URL for Smart-ID" )
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION YES)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG NO)
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-object_path_lto,lto.o")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-object_path_lto,lto.o")
endif()
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR RPM)
set(CPACK_PACKAGE_CONTACT "RIA <[email protected]>")
set(CPACK_PACKAGE_VENDOR RIA)
set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
include(CPack)
if(APPLE)
add_subdirectory(extensions/DigiDocQL)
elseif(WIN32)
add_subdirectory(extensions/windows)
elseif(UNIX)
option(ENABLE_KDE "Install KDE service menu (default: TRUE)" TRUE)
option(ENABLE_NAUTILUS_EXTENSION "Build Nautilus extension (default: TRUE)" TRUE)
if (ENABLE_KDE)
add_subdirectory(extensions/kde)
endif()
if (ENABLE_NAUTILUS_EXTENSION)
add_subdirectory(extensions/nautilus)
endif()
endif()
add_subdirectory( common )
add_subdirectory( client )