-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
58 lines (51 loc) · 1.73 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
cmake_minimum_required(VERSION 3.16)
project(LoopSubdiv VERSION 1.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Set up AUTOMOC and some sensible defaults for runtime execution
# When using Qt 6.3, you can replace the code block below with
# qt_standard_project_setup()
set(CMAKE_AUTOMOC ON)
include(GNUInstallDirs)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS OpenGL OpenGLWidgets Widgets)
qt_add_executable(LoopSubdiv WIN32 MACOSX_BUNDLE
initialization/meshinitializer.cpp initialization/meshinitializer.h
initialization/objfile.cpp initialization/objfile.h
main.cpp
mainview.cpp mainview.h
mainwindow.cpp mainwindow.h mainwindow.ui
mesh/face.cpp mesh/face.h
mesh/halfedge.cpp mesh/halfedge.h
mesh/mesh.cpp mesh/mesh.h
mesh/vertex.cpp mesh/vertex.h
renderers/meshrenderer.cpp renderers/meshrenderer.h
renderers/renderer.cpp renderers/renderer.h
settings.h
shadertypes.h
subdivision/subdivider.cpp
subdivision/loopsubdivider.cpp subdivision/loopsubdivider.h
subdivision/subdivider.h
util/util.h util/util.cpp
resources.qrc
)
target_link_libraries(LoopSubdiv PRIVATE
Qt::Core
Qt::Gui
)
if((QT_VERSION_MAJOR GREATER 5))
target_link_libraries(LoopSubdiv PRIVATE
Qt::OpenGL
Qt::OpenGLWidgets
Qt::Widgets
)
endif()
install(TARGETS LoopSubdiv
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.