forked from vsg-dev/vsgQt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (55 loc) · 1.55 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
68
69
70
71
cmake_minimum_required(VERSION 3.7)
project(vsgQt
VERSION 0.3.0
DESCRIPTION "Qt integration with VulkanSceneGraph"
LANGUAGES CXX
)
set(VSGQT_SOVERSION 3)
set(VSGQT_RELEASE_CANDIDATE 0)
set(VSGQT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "Root source directory of vsgQt")
set(VSGQT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "Root binary directory of vsgQt")
# set the use of C++17 globally as all examples require it
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(QT_PACKAGE_NAME Qt5 CACHE STRING "Set Qt package name, i.e. Qt5 or Qt6.")
find_package(vsg 1.1.2)
vsg_setup_dir_vars()
vsg_setup_build_vars()
find_package(vsgXchange) # only used by examples
# if Qt5 then we need 5.10 or later
find_package(${QT_PACKAGE_NAME} COMPONENTS Widgets REQUIRED)
vsg_add_target_clang_format(
FILES
include/*/*.h
src/*/*.cpp
)
vsg_add_target_clobber()
vsg_add_target_cppcheck(
FILES
include/*/*.h
src/*/*.cpp
)
vsg_add_target_docs(
FILES
src
include/*/*.h
src/*/*.cpp
)
vsg_add_target_uninstall()
# only provide custom targets if not building as a submodule/FetchContent
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
vsg_add_option_maintainer(
PREFIX v
RCLEVEL ${VSGQT_RELEASE_CANDIDATE}
)
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(WIN32)
add_definitions(-DNOMINMAX)
set(MODE WIN32)
endif()
add_subdirectory(src/vsgQt)
add_subdirectory(examples)
vsg_add_feature_summary()