-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
127 lines (102 loc) · 2.33 KB
/
CMakeLists.txt
File metadata and controls
127 lines (102 loc) · 2.33 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
cmake_minimum_required(VERSION 3.15)
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
project(dxfplotter)
option(WITH_ORTOOLS OFF "Enable ortools support for path optimization")
include(CTest)
include(CPack)
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Tristan Porteries")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC OFF)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(BUILD_TESTS OFF)
set(BUILD_SAMPLES OFF)
set(BUILD_EXAMPLES OFF)
set(USE_SCIP OFF)
set(USE_COINOR OFF)
set(BUILD_FLATZINC OFF)
set(USE_HIGHS OFF)
set(JUST_INSTALL_CEREAL ON)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
# Compilation flag with all warnings.
if(MSVC)
add_compile_options(/W4 /Zc:__cplusplus)
else()
add_compile_options(-fPIC -Wall -Wextra -DNDEBUG)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(TEMPLATE_DIR ${PROJECT_SOURCE_DIR}/template)
find_package(codecov)
find_package(PythonInterp REQUIRED)
if (WITH_ORTOOLS)
find_package(ortools CONFIG REQUIRED)
endif()
find_package(Qt6 COMPONENTS REQUIRED
Core
Widgets
Gui
Svg
3DCore
3DExtras
)
qt_standard_project_setup()
add_definitions(${Qt6Core_DEFINITIONS})
set(INCLUDE_DIRS
src
thirdparty
thirdparty/cereal/include
thirdparty/cavaliercontours/include
thirdparty/fmt/include
thirdparty/nanoflann/include
thirdparty/units/include
thirdparty/or-tools
template
${CMAKE_BINARY_DIR}/src
${CMAKE_BINARY_DIR}/template
${Qt6Widgets_INCLUDE_DIRS}
${Qt6Gui_INCLUDE_DIRS}
${Qt63DCore_INCLUDE_DIRS}
${Qt63DExtras_INCLUDE_DIRS}
)
set(LINK_LIBRARIES
resource
view
view-dialogs
view-dialogs-settings
view-task
view-view2d
view-simulation
view-simulation-internal
model
config
importer-dxf
importer-dxfplot
exporter-gcode
exporter-dxfplot
exporter-renderer
geometry
geometry-filter
libdxfrw
fmt::fmt
Qt6::Widgets
Qt6::Svg
Qt6::3DCore
Qt6::3DExtras
)
include_directories(${INCLUDE_DIRS})
add_subdirectory(template)
add_subdirectory(thirdparty EXCLUDE_FROM_ALL)
add_subdirectory(resource)
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(test)
endif()
add_executable(dxfplotter src/main.cpp)
target_link_libraries(dxfplotter ${LINK_LIBRARIES})
add_coverage(dxfplotter)
install(TARGETS dxfplotter DESTINATION bin)
coverage_evaluate()