-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
67 lines (51 loc) · 1.75 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
cmake_minimum_required(VERSION 3.25.1)
project(DiffusionCurveRenderer VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_PREFIX_PATH "$ENV{Qt6_Dir}")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INCLUDE_DIR
Libs/qtimgui/include
Libs/Eigen/include
Libs/opencv-4.6.0/include
)
set(LIBS_DIR
Libs/qtimgui/lib
Libs/opencv-4.6.0/lib
)
set(LIBS
debug debug/imgui
debug debug/qt_imgui_widgets
optimized release/imgui
optimized release/qt_imgui_widgets
optimized opencv_core460
optimized opencv_imgproc460
optimized opencv_highgui460
optimized opencv_imgcodecs460
)
find_package(Qt6 COMPONENTS Core Widgets OpenGL Gui Concurrent Xml REQUIRED)
file(GLOB_RECURSE SOURCES Source/*.cpp DiffusionCurveRenderer.qrc)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Source" ${INCLUDE_DIR})
link_directories(${LIBS_DIR})
add_executable(DiffusionCurveRenderer ${SOURCES})
target_link_libraries(DiffusionCurveRenderer Qt6::Core Qt6::Widgets Qt6::OpenGL Qt6::Concurrent Qt6::Xml ${LIBS})
add_custom_command(TARGET DiffusionCurveRenderer
POST_BUILD COMMAND ${CMAKE_COMMAND}
-E copy_directory
"${CMAKE_SOURCE_DIR}/Resources/"
"$<TARGET_FILE_DIR:DiffusionCurveRenderer>/Resources/"
)
add_custom_command(TARGET DiffusionCurveRenderer
POST_BUILD COMMAND ${CMAKE_COMMAND}
-E copy_directory
"${CMAKE_SOURCE_DIR}/Libs/opencv-4.6.0/bin/"
"$<TARGET_FILE_DIR:DiffusionCurveRenderer>"
)
add_custom_command(TARGET DiffusionCurveRenderer
POST_BUILD COMMAND
Qt6::windeployqt
--dir "$<TARGET_FILE_DIR:DiffusionCurveRenderer>"
"$<TARGET_FILE_DIR:DiffusionCurveRenderer>/$<TARGET_FILE_NAME:DiffusionCurveRenderer>"
)