-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (49 loc) · 1.74 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
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(tikzkit VERSION "0.80")
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 "5.15.2" NO_MODULE REQUIRED Core Widgets Svg Test)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
add_definitions(
#-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_TO_ASCII
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_USE_QSTRINGBUILDER
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_NO_KEYWORDS
-DQT_NO_FOREACH
)
include(FeatureSummary)
# prepare include folder in build dir: include/tikz/core/*.h
file(GLOB_RECURSE ALL_HEADERS ${CMAKE_SOURCE_DIR}/src/core/*.h)
foreach(header ${ALL_HEADERS})
file(STRINGS "${header}" lines REGEX "TIKZKITCORE_EXPORT")
if(lines)
file(COPY ${header}
DESTINATION ${CMAKE_BINARY_DIR}/include/tikz/core/)
endif()
endforeach()
# prepare include folder in build dir: include/tikz/ui/*.h
file(GLOB_RECURSE ALL_HEADERS ${CMAKE_SOURCE_DIR}/src/ui/*.h)
foreach(header ${ALL_HEADERS})
file(STRINGS "${header}" lines REGEX "TIKZKITUI_EXPORT")
if(lines)
file(COPY ${header}
DESTINATION ${CMAKE_BINARY_DIR}/include/tikz/ui/)
endif()
endforeach()
# _USE_MATH_DEFINES needed on Windows to define M_PI in <cmath>
add_compile_definitions(_USE_MATH_DEFINES)
add_subdirectory(src/core)
add_subdirectory(src/qtpropertybrowser/src)
add_subdirectory(src/ui)
add_subdirectory(src/app)
enable_testing()
add_subdirectory(tests)
# kate: indent-width 4; replace-tabs on;