-
Notifications
You must be signed in to change notification settings - Fork 34
/
CMakeLists.txt
84 lines (69 loc) · 2.2 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
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
cmake_minimum_required(VERSION 3.22.0)
project(ktikz)
if(POLICY CMP0160)
# NOTE: silence warnings in ECM (policy since cmake 3.29)
cmake_policy(SET CMP0160 OLD)
endif()
set(KTIKZ_VERSION "0.13.2")
set(KTIKZ_USE_KTEXTEDITOR TRUE CACHE BOOL "Use KTextEditor framework")
add_definitions(-DORGNAME=\"Florian_Hackenberger\")
add_definitions(-DAPPNAME=\"ktikz\")
add_definitions(-DAPPVERSION=\"${KTIKZ_VERSION}\")
add_definitions(-DKTIKZ_USE_DESKTOP_ICONS)
add_definitions(-DKTIKZ_USE_KDE)
add_definitions(-DKTIKZ_TIKZ_DOCUMENTATION_DEFAULT=\"/usr/share/doc/texmf/pgf/pgfmanual.pdf.gz\")
if(KTIKZ_USE_KTEXTEDITOR)
add_definitions(-DKTIKZ_USE_KTEXTEDITOR)
endif()
find_package(ECM 1.1.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
include(ECMSetupVersion)
include(ECMAddAppIcon)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(FeatureSummary)
find_package(
Qt5
5.15
CONFIG
REQUIRED Core Gui Widgets Xml PrintSupport LinguistTools
)
find_package(
KF5
5.92
REQUIRED DocTools XmlGui TextEditor Parts IconThemes
)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DQT_STRICT_ITERATORS)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wlogical-op")
endif()
endif()
find_package(Poppler "22.02" REQUIRED Qt5 Core)
set_package_properties(
"Poppler-Qt5"
PROPERTIES
DESCRIPTION "A PDF rendering library"
URL "http://poppler.freedesktop.org"
TYPE REQUIRED
PURPOSE "Support for PDF files in KTikZ."
)
add_subdirectory(app)
add_subdirectory(part)
add_subdirectory(doc)
add_subdirectory(translations)
add_subdirectory(data)
# Remove directories
add_custom_target(uninstalldirs)
add_dependencies(uninstalldirs uninstalldirs_app uninstalldirs_part uninstalldirs_doc)
# Make packages
include(KtikzCPackOptions.cmake)
include(CPack)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)