Export tinygltf target

This commit is contained in:
JosiahWI 2022-10-16 18:15:16 -05:00 committed by Josiah VanderZee
parent 36a90e9973
commit a3b2dbdebb
2 changed files with 10 additions and 7 deletions

View File

@ -18,5 +18,6 @@ target_compile_definitions(tinygltf
target_include_directories(tinygltf
INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>"
"$<INSTALL_INTERFACE:./>"
)

View File

@ -356,11 +356,6 @@ add_library(IRRMESHOBJ OBJECT
${IRRMESHLOADER}
)
target_link_libraries(IRRMESHOBJ
PRIVATE
tinygltf::tinygltf
)
add_library(IRROBJ OBJECT
CBillboardSceneNode.cpp
CCameraSceneNode.cpp
@ -547,6 +542,7 @@ target_link_libraries(IrrlichtMt PRIVATE
${ZLIB_LIBRARY}
${JPEG_LIBRARY}
${PNG_LIBRARY}
tinygltf::tinygltf
"$<$<BOOL:${USE_SDL2}>:SDL2::SDL2>"
"$<$<BOOL:${OPENGL_DIRECT_LINK}>:${OPENGL_LIBRARIES}>"
@ -579,7 +575,13 @@ if(WIN32)
endif()
# Installation of library
install(TARGETS IrrlichtMt
if(ANDROID)
set(INSTALL_TARGETS IrrlichtMt tinygltf native_app_glue)
else()
set(INSTALL_TARGETS IrrlichtMt tinygltf)
endif()
install(TARGETS ${INSTALL_TARGETS}
EXPORT IrrlichtMt-export
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)