-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
41 lines (25 loc) · 1.27 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
cmake_minimum_required(VERSION 3.25.1)
project(3DGlobeRenderer 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)
set(LIBS_DIR Libs/qtimgui/lib)
set(LIBS debug debug/imgui optimized release/imgui
debug debug/qt_imgui_widgets optimized release/qt_imgui_widgets)
find_package(Qt6 COMPONENTS Core Widgets OpenGL Gui REQUIRED)
add_compile_options(/bigobj)
file(GLOB_RECURSE SOURCES Source/*.cpp Source/*.h 3DGlobeRenderer.qrc)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Source" ${INCLUDE_DIR})
link_directories(${LIBS_DIR})
add_executable(3DGlobeRenderer ${SOURCES})
target_link_libraries(3DGlobeRenderer Qt6::Core Qt6::Widgets Qt6::OpenGL ${LIBS})
add_custom_command(TARGET 3DGlobeRenderer
POST_BUILD COMMAND xcopy /E /Y "\"$(SolutionDir)../Resources\"" "\"$(OutDir)Resources/*\"")
add_custom_command(TARGET 3DGlobeRenderer
POST_BUILD COMMAND xcopy /E /Y "\"$(SolutionDir)../Resources\"" "\"$(BuildDir)Resources/*\"")
add_custom_command(TARGET 3DGlobeRenderer
POST_BUILD COMMAND "$ENV{Qt6_DIR}/bin/windeployqt.exe" "\"$(OutDir)$(TargetName)$(TargetExt)\"")