Browse Source

Add TARGET_INCLUDE_DIRECTORIES for assimp target

With `TARGET_INCLUDE_DIRECTORIES` the `assimp` target can directly used in another CMake project, e.g. assimp can be used in a submodule with an `add_subdirectory()` call.
Seb Bro 7 years ago
parent
commit
cb1fc76859
1 changed files with 6 additions and 0 deletions
  1. 6 0
      code/CMakeLists.txt

+ 6 - 0
code/CMakeLists.txt

@@ -911,6 +911,12 @@ ENDIF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER)
 
 ADD_LIBRARY( assimp ${assimp_src} )
 
+TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
+  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
+  $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
+)
+
 TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} )
 
 if(ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)