1
1
cmake_minimum_required (VERSION 3.6)
2
2
3
- PROJECT (tinygltf)
3
+ project (tinygltf)
4
4
5
5
include (GNUInstallDirs)
6
6
include (CMakePackageConfigHelpers)
7
7
8
- SET (CMAKE_CXX_STANDARD 11)
8
+ set (CMAKE_CXX_STANDARD 11)
9
+ set (CMAKE_CXX_STANDARD_REQUIRED On )
10
+ set (CMAKE_CXX_EXTENSIONS Off )
11
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
9
12
10
13
option (TINYGLTF_BUILD_LOADER_EXAMPLE "Build loader_example(load glTF and dump infos)" ON )
11
14
option (TINYGLTF_BUILD_GL_EXAMPLES "Build GL exampels(requires glfw, OpenGL, etc)" OFF )
@@ -15,22 +18,22 @@ option(TINYGLTF_HEADER_ONLY "On: header-only mode. Off: create tinygltf library(
15
18
option (TINYGLTF_INSTALL "Install tinygltf files during install step. Usually set to OFF if you include tinygltf through add_subdirectory()" ON )
16
19
17
20
if (TINYGLTF_BUILD_LOADER_EXAMPLE)
18
- ADD_EXECUTABLE ( loader_example
21
+ add_executable ( loader_example
19
22
loader_example.cc
20
23
)
21
24
endif (TINYGLTF_BUILD_LOADER_EXAMPLE)
22
25
23
26
if (TINYGLTF_BUILD_GL_EXAMPLES)
24
- ADD_SUBDIRECTORY ( examples/gltfutil )
25
- ADD_SUBDIRECTORY ( examples/glview )
27
+ add_subdirectory ( examples/gltfutil )
28
+ add_subdirectory ( examples/glview )
26
29
endif (TINYGLTF_BUILD_GL_EXAMPLES)
27
30
28
31
if (TINYGLTF_BUILD_VALIDATOR_EXAMPLE)
29
- ADD_SUBDIRECTORY ( examples/validator )
32
+ add_subdirectory ( examples/validator )
30
33
endif (TINYGLTF_BUILD_VALIDATOR_EXAMPLE)
31
34
32
35
if (TINYGLTF_BUILD_BUILDER_EXAMPLE)
33
- ADD_SUBDIRECTORY ( examples/build -gltf )
36
+ add_subdirectory ( examples/build -gltf )
34
37
endif (TINYGLTF_BUILD_BUILDER_EXAMPLE)
35
38
36
39
#
0 commit comments