-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (23 loc) · 877 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (23 loc) · 877 Bytes
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
cmake_minimum_required(VERSION 3.20.1)
project(QGeoPlatform VERSION 0.0.1 LANGUAGES CXX CUDA)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CTest)
enable_testing(true)
file(GLOB QGP_SUB_DICTIONARIES LIST_DIRECTORIES true "src/*")
set(QGP_SUBMODULE_COUNT 0)
foreach(ITEM ${QGP_SUB_DICTIONARIES})
if(NOT EXISTS ${ITEM}/CMakeLists.txt)
continue()
endif()
get_filename_component(QGP_SUB_MODULE_NAME ${ITEM} NAME)
message(STATUS "[QGP]: detect submodule [qgp_${QGP_SUB_MODULE_NAME}]")
add_subdirectory(${ITEM})
math(EXPR QGP_SUBMODULE_COUNT "${QGP_SUBMODULE_COUNT} + 1" OUTPUT_FORMAT DECIMAL)
endforeach()
message(STATUS "[QGP]: ${QGP_SUBMODULE_COUNT} submodule(s) was found")