-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
71 lines (59 loc) · 1.59 KB
/
CMakeLists.txt
File metadata and controls
71 lines (59 loc) · 1.59 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
cmake_minimum_required(VERSION 3.27)
project(GeoAlgorithmStudy)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include(ThirdLibraryPaths.cmake)
# WIN32 indicate the exe don't display console window.
#add_executable(${PROJECT_NAME}
add_executable(${PROJECT_NAME} WIN32
main.cpp
VTKViewer.h
tutorials/01_bottle.h
tutorials/01_bottle.cpp
QRenderWindow.h
QRenderWindow.cpp
RenderWindow.ui
DDGStructure.cpp
DDGStructure.h
MouseInteractorStyle.h
MouseInteractorStyle.cpp
Signals.h
)
# VTK
find_package(VTK REQUIRED COMPONENTS
CommonColor
CommonCore
CommonDataModel
FiltersCore
FiltersExtraction
FiltersGeometry
FiltersSources
RenderingCore
RenderingAnnotation
RenderingContextOpenGL2
RenderingFreeType
RenderingGL2PSOpenGL2
RenderingOpenGL2
InteractionStyle
GUISupportQt
RenderingQt
IOGeometry
IOLegacy
IOPLY
IOXML
)
target_link_libraries(${PROJECT_NAME} PRIVATE ${VTK_LIBRARIES})
vtk_module_autoinit(TARGETS ${PROJECT_NAME} MODULES ${VTK_LIBRARIES})
# OCCT
find_package(OpenCASCADE REQUIRED)
include_directories(${OpenCASCADE_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PRIVATE ${OpenCASCADE_LIBRARIES})
# Qt6
set(Qt6_COMPONENTS Core Gui Widgets OpenGLWidgets)
foreach(_qt_comp IN LISTS Qt6_COMPONENTS)
list(APPEND Qt6_MODULES "Qt6::${_qt_comp}")
endforeach()
find_package(Qt6 REQUIRED COMPONENTS ${Qt6_COMPONENTS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE ${Qt6_MODULES})