From 2e7006797b6a4ec6852a7cd80f4ff351586cc55f Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Sat, 30 May 2020 02:27:25 +0900 Subject: [PATCH] Separrate build of examples. --- CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7864e5..30cc854 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,18 +4,24 @@ PROJECT (tinygltf) SET(CMAKE_CXX_STANDARD 11) -option(TINYGLTF_BUILD_EXAMPLES "Build examples" ON) +option(TINYGLTF_BUILD_LOADER_EXAMPLE "Build loader_example" ON) +option(TINYGLTF_BUILD_GL_EXAMPLES "Build GL exampels(requires glfw, OpenGL, etc)" OFF) +option(TINYGLTF_BUILD_VALIDATOR_EXAMPLE "Build validator exampe" OFF) -if (TINYGLTF_BUILD_EXAMPLES) +if (TINYGLTF_BUILD_LOADER_EXAMPLE) ADD_EXECUTABLE ( loader_example loader_example.cc ) +endif (TINYGLTF_BUILD_LOADER_EXAMPLE) +if (TINYGLTF_BUILD_GL_EXAMPLES) ADD_SUBDIRECTORY ( examples/gltfutil ) ADD_SUBDIRECTORY ( examples/glview ) - ADD_SUBDIRECTORY ( examples/validator ) -endif (TINYGLTF_BUILD_EXAMPLES) +endif (TINYGLTF_BUILD_GL_EXAMPLES) +if (TINYGLTF_BUILD_VALIDATOR_EXAMPLE) + ADD_SUBDIRECTORY ( examples/validator ) +endif (TINYGLTF_BUILD_VALIDATOR_EXAMPLE) # # TinuGLTF is a header-only library, so no library build. just install header files. #