Verified Commit 9da2be85 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix variables names and general export

parent 0f94a795
...@@ -86,7 +86,7 @@ endif () ...@@ -86,7 +86,7 @@ endif ()
search_for_boost() search_for_boost()
# Optional dependencies # Optional dependencies
ADD_PROJECT_DEPENDENCY(octomap PKG_CONFIG_REQUIRES "octomap >= 1.6") ADD_PROJECT_DEPENDENCY(octomap PKG_CONFIG_REQUIRES "octomap >= 1.6")
if (OCTOMAP_FOUND) if (octomap_FOUND)
SET(HPP_FCL_HAVE_OCTOMAP TRUE) SET(HPP_FCL_HAVE_OCTOMAP TRUE)
string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION}) string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION})
list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION) list(GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION)
......
...@@ -161,7 +161,8 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ...@@ -161,7 +161,8 @@ 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} ${ASSIMP_LIBRARY_DIRS}/${ASSIMP_LIBRARIES}
# assimp::assimp # Not working
# Boost::thread # Boost::thread
# Boost::date_time # Boost::date_time
# Boost::system # Boost::system
...@@ -177,8 +178,8 @@ endif() ...@@ -177,8 +178,8 @@ 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}
${ASSIMP_INCLUDE_DIRS}
) )
target_include_directories(${LIBRARY_NAME} target_include_directories(${LIBRARY_NAME}
...@@ -186,21 +187,21 @@ target_include_directories(${LIBRARY_NAME} ...@@ -186,21 +187,21 @@ target_include_directories(${LIBRARY_NAME}
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
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()
message(STATUS "Assimp version does not have unified headers") message(STATUS "Assimp version does not have unified headers")
endif() endif()
IF(OCTOMAP_FOUND) IF(octomap_FOUND)
target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC ${OCTOMAP_INCLUDE_DIR}) target_include_directories(${LIBRARY_NAME} SYSTEM PUBLIC ${OCTOMAP_INCLUDE_DIRS})
target_link_libraries(${LIBRARY_NAME} PUBLIC ${OCTOMAP_LIBRARY}) target_link_libraries(${LIBRARY_NAME} PUBLIC ${OCTOMAP_LIBRARIES})
target_compile_definitions (${LIBRARY_NAME} PRIVATE target_compile_definitions (${LIBRARY_NAME} PUBLIC
-DHPP_FCL_HAVE_OCTOMAP -DHPP_FCL_HAVE_OCTOMAP
-DOCTOMAP_MAJOR_VERSION=${OCTOMAP_MAJOR_VERSION} -DOCTOMAP_MAJOR_VERSION=${OCTOMAP_MAJOR_VERSION}
-DOCTOMAP_MINOR_VERSION=${OCTOMAP_MINOR_VERSION} -DOCTOMAP_MINOR_VERSION=${OCTOMAP_MINOR_VERSION}
-DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION}) -DOCTOMAP_PATCH_VERSION=${OCTOMAP_PATCH_VERSION})
ENDIF(OCTOMAP_FOUND) ENDIF(octomap_FOUND)
install(TARGETS ${LIBRARY_NAME} install(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME} EXPORT ${TARGETS_EXPORT_NAME}
......
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