don't link or include missing FBX library

This commit is contained in:
Stephen Birarda 2017-04-18 17:15:33 -07:00
parent 6127b72834
commit 4863c924d1
2 changed files with 7 additions and 3 deletions

View file

@ -4,8 +4,12 @@ setup_hifi_library(Concurrent)
link_hifi_libraries(networking image gpu shared ktx)
find_package(FBXSDK)
target_link_libraries(${TARGET_NAME} ${FBX_LIBRARIES})
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${FBX_INCLUDE_DIR})
# try to find the FBX SDK but fail silently if we don't
# because this library is not built by default
find_package(FBX)
if (FBX_FOUND)
target_link_libraries(${TARGET_NAME} ${FBX_LIBRARIES})
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${FBX_INCLUDE_DIR})
endif ()
set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE)