-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.38 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
# SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: CC0-1.0
cmake_minimum_required(VERSION 3.13)
if(NOT DEFINED VERSION)
set(VERSION 5.3.9)
endif()
# 安全测试的开关
set(CMAKE_SAFETYTEST OFF)
project(deepin_deb_installer)
option(DMAN_RELEAE OFF "Install dman resources to system or not")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
# 引入翻译生成
include(translation-generate)
# Find Qt version
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
message(" >>> Found Qt version: ${QT_VERSION_MAJOR}")
set(QT_DESIRED_VERSION ${QT_VERSION_MAJOR})
if (QT_VERSION_MAJOR MATCHES 6)
set(DTK_VERSION_MAJOR 6)
else()
set(DTK_VERSION_MAJOR "")
endif()
message(" >>> Build with DTK: ${DTK_VERSION_MAJOR}")
if (QT_DESIRED_VERSION MATCHES 6)
find_package(QApt-qt6 REQUIRED)
include_directories(${QApt-qt6_INCLUDE_DIRS})
set(QAPT_LIB QApt-qt6)
else()
find_package(QApt REQUIRED)
include_directories(${QApt_INCLUDE_DIRS})
set(QAPT_LIB QApt)
endif()
add_subdirectory(src/AptInstallDepend)
add_subdirectory(src/deb-installer)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_subdirectory(tests)
endif()
add_subdirectory(src/deepin-deb-installer-dev)
set(POLICY_FILE com.deepin.pkexec.aptInstallDepend.policy)
add_subdirectory(translations/policy)
# add_subdirectory(tests/FuzzyTest)