-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.73 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
cmake_minimum_required(VERSION 3.18.0 FATAL_ERROR)
# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level
# CMakeLists.txt file even before calling the project() command.
# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION)
# command to specify that the current project code is written for the given range of CMake
# versions.
project(lxqt-archiver)
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
option(USE_7Z "Building with 7zip" ON)
if(USE_7Z)
add_definitions(-DUSE_7Z)
endif()
set(GLIB_MINIMUM_VERSION "2.50.0")
set(LIBFMQT_MINIMUM_VERSION "2.1.0")
set(LXQTBT_MINIMUM_VERSION "2.1.0")
set(QT_MINIMUM_VERSION "6.6.0")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include(GNUInstallDirs)
find_package(Qt6Widgets ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt6LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
find_package(fm-qt6 ${LIBFMQT_MINIMUM_VERSION} REQUIRED)
find_package(lxqt2-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(
GLIB_JSON
json-glib-1.0
REQUIRED
)
set(LXQT_ARCHIVER_MAJOR_VERSION 1)
set(LXQT_ARCHIVER_MINOR_VERSION 1)
set(LXQT_ARCHIVER_PATCH_VERSION 0)
set(LXQT_ARCHIVER_VERSION ${LXQT_ARCHIVER_MAJOR_VERSION}.${LXQT_ARCHIVER_MINOR_VERSION}.${LXQT_ARCHIVER_PATCH_VERSION})
add_definitions("-DLXQT_ARCHIVER_VERSION=\"${LXQT_ARCHIVER_VERSION}\"")
include(LXQtPreventInSourceBuilds)
include(LXQtCompilerSettings NO_POLICY_SCOPE)
include(LXQtTranslate)
add_subdirectory(src)