-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
61 lines (56 loc) · 2.51 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
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
#============================================================================
# Initialize the project
#============================================================================
project(gz_usd0 VERSION 0.0.1)
if("$ENV{GZ_VERSION}" STREQUAL "harmonic")
find_package(gz-cmake3 REQUIRED)
#--------------------------------------
# Find gz-common
gz_find_package(gz-common5 REQUIRED COMPONENTS graphics)
set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR})
set(GZ_COMMON_LIB gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER})
set(GZ_COMMON_GRAPHICS_LIB gz-common${GZ_COMMON_VER}::graphics)
#--------------------------------------
# Find gz-utils
gz_find_package(gz-utils2 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})
set(GZ_UTILS_LIB gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER})
set(GZ_UTILS_CLI_LIB gz-utils${GZ_UTILS_VER}::cli)
# cone shape was added in 14.4
find_package(sdformat14 14.4 REQUIRED)
SET(SDFORMAT_VER 14)
else()
find_package(gz-cmake4 REQUIRED)
#--------------------------------------
# Find gz-common
gz_find_package(gz-common6 REQUIRED COMPONENTS graphics)
set(GZ_COMMON_VER ${gz-common6_VERSION_MAJOR})
set(GZ_COMMON_LIB gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER})
set(GZ_COMMON_GRAPHICS_LIB gz-common${GZ_COMMON_VER}::graphics)
#--------------------------------------
# Find gz-utils
gz_find_package(gz-utils3 REQUIRED COMPONENTS cli)
set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR})
set(GZ_UTILS_LIB gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER})
set(GZ_UTILS_CLI_LIB gz-utils${GZ_UTILS_VER}::cli)
find_package(sdformat15 REQUIRED)
SET(SDFORMAT_VER 15)
endif()
########################################
# Find PXR
gz_find_package(pxr REQUIRED)
#============================================================================
# Configure the project
#============================================================================
set(c++standard 17)
set (CMAKE_CXX_STANDARD 17)
gz_configure_project(VERSION_SUFFIX)
#============================================================================
# Configure the build
#============================================================================
gz_configure_build(QUIT_IF_BUILD_ERRORS)
#============================================================================
# Create package information
#============================================================================
gz_create_packages()