-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
66 lines (56 loc) · 1.38 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
cmake_minimum_required(VERSION 3.26.4)
project(PathfinderVisualization LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
add_subdirectory(Pathfinder)
set(PROJECT_SOURCES
main.cpp
main_window.cpp
main_window.hpp
navmesh_display.hpp
navmesh_display_base.cpp
navmesh_display_base.hpp
navmesh_render_area.hpp
navmesh_render_area_base.cpp
navmesh_render_area_base.hpp
zoomable_scroll_area.cpp
zoomable_scroll_area.hpp
)
set(RESOURCE_FILES
resources.qrc
)
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
qt_add_executable(${PROJECT_NAME}
${PROJECT_SOURCES}
${RESOURCE_FILES}
)
else()
if(ANDROID)
add_library(${PROJECT_NAME} SHARED
${PROJECT_SOURCES}
${RESOURCE_FILES}
)
else()
add_executable(${PROJECT_NAME}
${PROJECT_SOURCES}
${RESOURCE_FILES}
)
endif()
endif()
target_link_libraries(${PROJECT_NAME}
PRIVATE
Qt${QT_VERSION_MAJOR}::Widgets
Pathfinder
PUBLIC
absl::log
absl::log_initialize
)
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)