-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
114 lines (91 loc) · 2.01 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
111
112
113
114
cmake_minimum_required(VERSION 3.15)
project(dxfplotter)
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(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(BUILD_TESTS OFF)
set(JUST_INSTALL_CEREAL ON)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# Compilation flag with all warnings.
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-fPIC -Wall -Wextra)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(TEMPLATE_DIR ${PROJECT_SOURCE_DIR}/template)
find_package(codecov)
find_package(PythonInterp REQUIRED)
find_package(Qt5 COMPONENTS REQUIRED
Core
Widgets
Gui
Svg
3DCore
3DExtras
)
#qt_standard_project_setup()
set(INCLUDE_DIRS
src
thirdparty
thirdparty/cereal/include
thirdparty/cavaliercontours/include
thirdparty/fmt/include
thirdparty/nanoflann/include
thirdparty/units/include
thirdparty/yaml-cpp/include
template
${CMAKE_BINARY_DIR}/src
${CMAKE_BINARY_DIR}/template
${Qt5Widgets_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt53DCore_INCLUDE_DIRS}
${Qt53DExtras_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
Qt5::Widgets
Qt5::Svg
Qt5::3DCore
Qt5::3DExtras
yaml-cpp
)
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()