-
Notifications
You must be signed in to change notification settings - Fork 81
/
CMakeLists.txt
58 lines (44 loc) · 1.65 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.12)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cmake/MunkeiVersionFromGit.cmake)
version_from_git(
LOG ON
TIMESTAMP "%Y%m%d%H%M%S"
)
project(NEUVision
LANGUAGES CXX
VERSION ${VERSION}
DESCRIPTION "A framework for structured light scanning projects"
)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# By default set release configuration
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()
add_compile_definitions(Z3D_VERSION_STR="${VERSION}")
add_compile_definitions(Z3D_VERSION_BUILD_STR="${SEMVER}")
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
message("This is a release build (CMAKE_BUILD_TYPE=" ${CMAKE_BUILD_TYPE} ")")
add_compile_definitions(Z3D_RELEASE_BUILD)
endif()
add_compile_definitions(_USE_MATH_DEFINES)
# disable all the deprecated APIs in Qt <= 6
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x060000)
# Output directories
set(Z3D_OUTPUT_DIRECTORY ${NEUVision_BINARY_DIR}/bin)
foreach(type LIBRARY RUNTIME ARCHIVE)
if(NOT DEFINED CMAKE_${type}_OUTPUT_DIRECTORY)
set(CMAKE_${type}_OUTPUT_DIRECTORY ${Z3D_OUTPUT_DIRECTORY} CACHE INTERNAL "Single output directory for building all libraries.")
endif()
endforeach()
add_subdirectory(3rdparty/qtpropertybrowser)
add_subdirectory(lib)
add_subdirectory(apps)
enable_testing()
add_subdirectory(tests)
include(FeatureSummary)
feature_summary(WHAT ALL)