Skip to content

Commit

Permalink
Restored ability to link to the built-in versions
Browse files Browse the repository at this point in the history
  • Loading branch information
spillner committed May 9, 2023
1 parent 7233996 commit 4cb9723
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doomsday/cmake/FindAssimp.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
if (DE_USE_SYSTEM_ASSIMP)
include (${DE_CMAKE_DIR}/assimp-system.cmake)
include (${DE_CMAKE_DIR}/assimp-system.cmake)
else ()
include (assimp-config) # from deps
include (assimp-config) # from deps
endif ()

add_library (assimp INTERFACE)
set (_cxxFlags ${ASSIMP_CXX_FLAGS})
separate_arguments (_cxxFlags)
target_compile_options (assimp INTERFACE ${_cxxFlags})
target_include_directories (assimp INTERFACE ${ASSIMP_INCLUDE_DIRS})
target_link_libraries (assimp INTERFACE ${ASSIMP_LIBRARIES})
if (DE_USE_SYSTEM_ASSIMP)
target_link_libraries (assimp INTERFACE ${ASSIMP_LIBRARIES})
else ()
target_link_libraries (assimp INTERFACE -L${ASSIMP_LIBRARY_DIRS} -l${ASSIMP_LIBRARIES})
endif ()

0 comments on commit 4cb9723

Please sign in to comment.