Introduce TINYGLTF_BUILD_EXAMPLES option to CMakeLists.txt. Fixes #218

This commit is contained in:
Syoyo Fujita 2019-10-31 01:55:57 +09:00
parent 9ff3d93084
commit 419162716e

View File

@ -4,14 +4,21 @@ PROJECT (tinygltf)
SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_CXX_STANDARD 11)
ADD_EXECUTABLE ( loader_example option(TINYGLTF_BUILD_EXAMPLES "Build examples" ON)
loader_example.cc
)
ADD_SUBDIRECTORY ( examples/gltfutil ) if (TINYGLTF_BUILD_EXAMPLES)
ADD_SUBDIRECTORY ( examples/glview ) ADD_EXECUTABLE ( loader_example
ADD_SUBDIRECTORY ( examples/validator ) loader_example.cc
)
ADD_SUBDIRECTORY ( examples/gltfutil )
ADD_SUBDIRECTORY ( examples/glview )
ADD_SUBDIRECTORY ( examples/validator )
endif (TINYGLTF_BUILD_EXAMPLES)
#
# TinuGLTF is a header-only library, so no library build. just install header files.
#
INSTALL ( FILES INSTALL ( FILES
json.hpp json.hpp
stb_image.h stb_image.h