File: CMakeLists.txt

package info (click to toggle)
lxqt-admin 0.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,028 kB
  • sloc: cpp: 1,651; sh: 92; makefile: 11
file content (46 lines) | stat: -rw-r--r-- 1,733 bytes parent folder | download
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
cmake_minimum_required(VERSION 3.1.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-admin)

option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)

# Set default installation paths
set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries")

# Minimum Versions
set(KF5_MINIMUM_VERSION "5.36.0")
set(LXQT_MINIMUM_VERSION "0.14.1")
set(QT_MINIMUM_VERSION "5.7.1")

find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED)
find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
find_package(PolkitQt5-1 REQUIRED)

# Patch Version
set(LXQT_ADMIN_PATCH_VERSION 1)

set(LXQT_ADMIN_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_ADMIN_PATCH_VERSION})
add_definitions(
    "-DLXQT_ADMIN_VERSION=\"${LXQT_ADMIN_VERSION}\""
    "-DQT_NO_CAST_FROM_ASCII"
    "-DQT_NO_CAST_TO_ASCII"
    "-DQT_NO_URL_CAST_FROM_STRING"
    "-DQT_NO_CAST_FROM_BYTEARRAY"
)

include(LXQtPreventInSourceBuilds)
include(LXQtCompilerSettings NO_POLICY_SCOPE)
include(LXQtTranslate)

if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
    message(WARNING "${CMAKE_SYSTEM_NAME} is not supported by lxqt-admin-user")
    message(WARNING "${CMAKE_SYSTEM_NAME} is not supported by lxqt-admin-time")
else()
    add_subdirectory(lxqt-admin-user)
    add_subdirectory(lxqt-admin-time)
endif()