Merge pull request #119 from nyue/master

Add CMake package for developer
This commit is contained in:
Syoyo Fujita 2018-12-07 18:48:14 +09:00 committed by GitHub
commit a9d862aeee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View File

@ -20,3 +20,9 @@ INSTALL ( FILES
DESTINATION
include
)
INSTALL ( FILES
cmake/glTFConfig.cmake
DESTINATION
cmake
)

17
cmake/glTFConfig.cmake Normal file
View File

@ -0,0 +1,17 @@
# -*- cmake -*-
# - Find glTF
# glTF_INCLUDE_DIR glTF's include directory
FIND_PACKAGE ( PackageHandleStandardArgs )
SET ( glTF_INCLUDE_DIR "${glTF_DIR}/../include" CACHE STRING "glTF include directory")
FIND_FILE ( glTF_HEADER tiny_gltf.h PATHS ${glTF_INCLUDE_DIR} )
IF (glTF_HEADER)
# MESSAGE ( STATUS "FOUND tiny_gltf.h, glTF_INCLUDE_DIR = ${glTF_INCLUDE_DIR}")
ELSE ()
MESSAGE ( FATAL_ERROR "Unable to find tiny_gltf.h, glTF_INCLUDE_DIR = ${glTF_INCLUDE_DIR}")
ENDIF ()