-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCMakeLists.txt
59 lines (47 loc) · 1.39 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
cmake_minimum_required(VERSION 3.7)
project(osg2vsg
VERSION 0.2.0
DESCRIPTION "OpenSceneGraph/VulkanSceneGraph integration library"
LANGUAGES CXX
)
set(OSG2VSG_SOVERSION 0)
SET(OSG2VSG_RELEASE_CANDIDATE 0)
set(OpenGL_GL_PREFERENCE "GLVND")
find_package(OpenGL REQUIRED)
# Find OpenSceneGraph packages for reference
# set preference for using modern OpenGL library.
find_package(OpenSceneGraph REQUIRED COMPONENTS osgDB osgTerrain osgUtil osgGA osgViewer)
if (VULKAN_SDK)
set(ENV{VULKAN_SDK} ${VULKAN_SDK})
endif()
find_package(vsg 1.1.2)
vsg_setup_dir_vars()
vsg_setup_build_vars()
vsg_add_target_clang_format(
FILES
${PROJECT_SOURCE_DIR}/include/*/*.h
${PROJECT_SOURCE_DIR}/src/*/*.cpp
)
vsg_add_target_clobber()
vsg_add_target_cppcheck(
FILES
${PROJECT_SOURCE_DIR}/include/*/*.h
${PROJECT_SOURCE_DIR}/src/*/*.cpp
-I ${PROJECT_SOURCE_DIR}/include/
)
vsg_add_target_docs(
FILES
${PROJECT_SOURCE_DIR}/include/
)
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 ${OSG2VSG_RELEASE_CANDIDATE}
)
endif()
# src directory contains all the example applications etc.
add_subdirectory(src/osg2vsg)
add_subdirectory(src/osgPlugins/vsg)
add_subdirectory(applications)