Work around cmake<3.12 object target rules

CMake does not allow specifying usage requirements with
target_link_libraries() until version 3.12.
This commit is contained in:
JosiahWI 2023-05-15 10:43:41 -05:00 committed by Josiah VanderZee
parent eaebd34c4e
commit c9e05c6e9a
1 changed files with 13 additions and 0 deletions

View File

@ -359,6 +359,19 @@ add_library(IRRMESHOBJ OBJECT
${IRRMESHLOADER}
)
get_property(tinygltf_INCLUDE_DIRS
TARGET tinygltf::tinygltf
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)
get_property(tinygltf_COMPILE_DEFS
TARGET tinygltf::tinygltf
PROPERTY INTERFACE_COMPILE_DEFINITIONS
)
target_include_directories(IRRMESHOBJ PRIVATE ${tinygltf_INCLUDE_DIRS})
target_compile_definitions(IRRMESHOBJ PUBLIC ${tinygltf_COMPILE_DEFS})
add_library(IRROBJ OBJECT
CBillboardSceneNode.cpp
CCameraSceneNode.cpp