Verified Commit c7854199 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: use CMake standard convention for Assimp

parent 923dacf4
...@@ -116,7 +116,7 @@ if(HPP_FCL_HAS_QHULL) ...@@ -116,7 +116,7 @@ if(HPP_FCL_HAS_QHULL)
) )
endif() endif()
ADD_REQUIRED_DEPENDENCY("assimp >= 2.0") ADD_PROJECT_DEPENDENCY(assimp REQUIRED PKG_CONFIG_REQUIRES "assimp >= 2.0.0")
SET(${PROJECT_NAME}_HEADERS SET(${PROJECT_NAME}_HEADERS
include/hpp/fcl/collision_data.h include/hpp/fcl/collision_data.h
......
...@@ -161,6 +161,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ...@@ -161,6 +161,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
${Boost_THREAD_LIBRARY} ${Boost_THREAD_LIBRARY}
${Boost_DATE_TIME_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${assimp_LIBRARY}
# Boost::thread # Boost::thread
# Boost::date_time # Boost::date_time
# Boost::system # Boost::system
...@@ -176,6 +177,7 @@ endif() ...@@ -176,6 +177,7 @@ endif()
target_include_directories(${LIBRARY_NAME} target_include_directories(${LIBRARY_NAME}
SYSTEM PUBLIC SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR}
${assimp_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
) )
...@@ -184,8 +186,7 @@ target_include_directories(${LIBRARY_NAME} ...@@ -184,8 +186,7 @@ target_include_directories(${LIBRARY_NAME}
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} assimp) if (NOT ${assimp_VERSION} VERSION_LESS "2.0.1150")
if (NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150")
target_compile_definitions(${LIBRARY_NAME} PRIVATE -DHPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES) target_compile_definitions(${LIBRARY_NAME} PRIVATE -DHPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES)
message(STATUS "Assimp version has unified headers") message(STATUS "Assimp version has unified headers")
else() else()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment