-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathCMakeLists.txt
114 lines (86 loc) · 3.27 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#/*******************************************************************************
#* Author : Damir Bakiev *
#* Version : na *
#* Date : 03 October 2022 *
#* Website : na *
#* Copyright : Damir Bakiev 2016-2022 *
#* License : *
#* Use, modification & distribution is subject to Boost Software License Ver 1. *
#* http://www.boost.org/LICENSE_1_0.txt *
#********************************************************************************/
cmake_minimum_required(VERSION 3.24)
# set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time")
# set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CMAKE_COMMAND} -E time")
# Optional IPO. Do not use IPO if it's not supported by compiler.
#check_ipo_supported(RESULT result OUTPUT output)
#if(result)
set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
#else()
# message(WARNING "IPO is not supported: ${output}")
#endif()
project(GERBER_X3)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set_property(GLOBAL PROPERTY CXX_STANDARD 20)
set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
include(${CMAKE_SOURCE_DIR}/PATHS.cmake)
add_definitions(
-DQT_MESSAGELOGCONTEXT # qDebug()
-DQT_DISABLE_DEPRECATED_BEFORE=0x060000
-DQT_NO_CAST_TO_ASCII=1 # ERORR QByteArray &appendToByteArray(QByteArray &a, const QStringBuilder<A, B> &b, QChar)
)
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(
-Winvalid-pch
-pthread
# -fmodules-ts
)
link_directories(tbb/lib)
## Link against the dependency of Intel TBB (for parallel C++17 algorithms)
#target_link_libraries(${PROJECT_NAME} tbb)
# set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FORMAT "gcc")
# set(CMAKE_EXPERIMENTAL_CXX_MODULE_MAP_FLAG "${compiler_flags_for_module_map} -fmodule-mapper=<MODULE_MAP_FILE>")
# target_compile_options(example PRIVATE -fmodules-ts)
# add_compile_options(-H)
# add_compile_options(-ftime-report)
# -pthread
# -ltbbD
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# add_definitions(-D_USE_MATH_DEFINES=1)
endif()
# FIND BOOST
find_package(Boost)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
else()
message(FATAL_ERROR "Boost not found!!!")
endif()
set(INC_DIRS
third_party/ctre/single-header/
third_party/clipper2/CPP/Clipper2Lib/include/
ggeasy
plugins/file
plugins/gcode
plugins/shape
static_libs/clipper
static_libs/common
static_libs/filetree
static_libs/gi
static_libs/graphicsview
static_libs/tooldatabase
)
add_subdirectory(third_party/clipper2/CPP)
include_directories(${INC_DIRS})
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# STATIC LIBS
add_subdirectory(static_libs)
# PLUGINS
add_subdirectory(plugins)
# MAIN APP
add_subdirectory(ggeasy)
#add_subdirectory(ToolTest)