-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added FindFastGLTF.cmake, FindGLM.cmake, and FindSTB.cmake scripts.
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Looks for the environment variable: | ||
# FASTGLTF_PATH | ||
|
||
# Sets the variables : | ||
# FASTGLTF_INCLUDE_DIR | ||
# FASTGLTF_LIBRARY | ||
|
||
# FastGLTF_FOUND | ||
|
||
set(FASTGLTF_PATH $ENV{FASTGLTF_PATH}) | ||
|
||
if ("${FASTGLTF_PATH}" STREQUAL "") | ||
set(FASTGLTF_PATH "${LOCAL_3RDPARTY}/fastgltf") | ||
endif() | ||
|
||
message("FASTGLTF_PATH = " "${FASTGLTF_PATH}") | ||
|
||
# After the fastgltf INSTALL project ran, the release library resides in 3rdparty/fastgltf/lib | ||
# Unfortunately that is always only one build target. | ||
# The 3rdparty.cmake script builds both Debug and Release targets under Windows but installs only the the Release target. | ||
# If you need to run the GLTF_renderer as Debug target, copy the files from 3rdparty\fastgltf\build\<msc-toolset>\Debug to 3rdparty\fastgltf\lib | ||
|
||
set(FASTGLTF_INCLUDE_DIR "${FASTGLTF_PATH}/include") | ||
message("FASTGLTF_INCLUDE_DIR = " "${FASTGLTF_INCLUDE_DIR}") | ||
|
||
find_library(FASTGLTF_LIBRARY NAMES fastgltf PATHS "${FASTGLTF_PATH}/lib") | ||
message("FASTGLTF_LIBRARY = " "${FASTGLTF_LIBRARY}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args(FastGLTF DEFAULT_MSG FASTGLTF_INCLUDE_DIR FASTGLTF_LIBRARY) | ||
|
||
mark_as_advanced(FASTGLTF_INCLUDE_DIR FASTGLTF_LIBRARY) | ||
|
||
message("FastGLTF_FOUND = " "${FastGLTF_FOUND}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Looks for the environment variable: | ||
# GLM_PATH | ||
|
||
# Sets the variables : | ||
# GLM_INCLUDE_DIR | ||
|
||
# GLM_FOUND | ||
|
||
set(GLM_PATH $ENV{GLM_PATH}) | ||
|
||
if ("${GLM_PATH}" STREQUAL "") | ||
set(GLM_PATH "${LOCAL_3RDPARTY}/glm") | ||
endif() | ||
|
||
message("GLM_PATH = " "${GLM_PATH}") | ||
|
||
set(GLM_INCLUDE_DIR "${GLM_PATH}") | ||
message("GLM_INCLUDE_DIR = " "${GLM_INCLUDE_DIR}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args(GLM DEFAULT_MSG GLM_INCLUDE_DIR) | ||
|
||
mark_as_advanced(GLM_INCLUDE_DIR) | ||
|
||
message("GLM_FOUND = " "${GLM_FOUND}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Looks for the environment variable: | ||
# STB_PATH | ||
|
||
# Sets the variables : | ||
# STB_INCLUDE_DIR | ||
|
||
# STB_FOUND | ||
|
||
set(STB_PATH $ENV{STB_PATH}) | ||
|
||
if ("${STB_PATH}" STREQUAL "") | ||
set(STB_PATH "${LOCAL_3RDPARTY}/stb") | ||
endif() | ||
|
||
message("STB_PATH = " "${STB_PATH}") | ||
|
||
set(STB_INCLUDE_DIR "${STB_PATH}") | ||
message("STB_INCLUDE_DIR = " "${STB_INCLUDE_DIR}") | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
find_package_handle_standard_args(STB DEFAULT_MSG STB_INCLUDE_DIR) | ||
|
||
mark_as_advanced(STB_INCLUDE_DIR) | ||
|
||
message("STB_FOUND = " "${STB_FOUND}") |