From a3b2dbdebbf8e3b52dafe48901ae16795bf46639 Mon Sep 17 00:00:00 2001 From: JosiahWI Date: Sun, 16 Oct 2022 18:15:16 -0500 Subject: [PATCH] Export tinygltf target --- source/lib/tinygltf/CMakeLists.txt | 3 ++- src/CMakeLists.txt | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/source/lib/tinygltf/CMakeLists.txt b/source/lib/tinygltf/CMakeLists.txt index 00d3b3b7..7f86233b 100644 --- a/source/lib/tinygltf/CMakeLists.txt +++ b/source/lib/tinygltf/CMakeLists.txt @@ -18,5 +18,6 @@ target_compile_definitions(tinygltf target_include_directories(tinygltf INTERFACE - "${CMAKE_CURRENT_SOURCE_DIR}" + "$" + "$" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4e4e63b..9ac8c595 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 "$<$:SDL2::SDL2>" "$<$:${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}" )