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}" )