Verified Commit 925c715a authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: add support of IDE for easy exploration

parent 77656cb0
...@@ -55,6 +55,7 @@ include(cmake/boost.cmake) ...@@ -55,6 +55,7 @@ include(cmake/boost.cmake)
include(cmake/python.cmake) include(cmake/python.cmake)
include(cmake/hpp.cmake) include(cmake/hpp.cmake)
include(cmake/apple.cmake) include(cmake/apple.cmake)
include(cmake/ide.cmake)
# If needed, fix CMake policy for APPLE systems # If needed, fix CMake policy for APPLE systems
APPLY_DEFAULT_APPLE_CONFIGURATION() APPLY_DEFAULT_APPLE_CONFIGURATION()
......
...@@ -39,13 +39,22 @@ SET(LIBRARY_NAME hppfcl) ...@@ -39,13 +39,22 @@ SET(LIBRARY_NAME hppfcl)
INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIRS}) INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIRS})
ADD_LIBRARY(${LIBRARY_NAME} SHARED SET(${LIBRARY_NAME}_HEADERS
fcl.hh
)
SET(${LIBRARY_NAME}_SOURCES
version.cc version.cc
math.cc math.cc
collision-geometries.cc collision-geometries.cc
collision.cc collision.cc
distance.cc distance.cc
fcl.cc) fcl.cc
)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
ADD_HEADER_GROUP(${LIBRARY_NAME}_HEADER)
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME} PUBLIC) TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME} PUBLIC)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} PUBLIC ${PROJECT_NAME} ${BOOST_system_LIBRARY}) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} PUBLIC ${PROJECT_NAME} ${BOOST_system_LIBRARY})
......
...@@ -82,11 +82,21 @@ set(${LIBRARY_NAME}_SOURCES ...@@ -82,11 +82,21 @@ set(${LIBRARY_NAME}_SOURCES
mesh_loader/loader.cpp mesh_loader/loader.cpp
) )
SET(PROJECT_HEADERS_FULL_PATH)
FOREACH(header ${${PROJECT_NAME}_HEADERS})
LIST(APPEND PROJECT_HEADERS_FULL_PATH ${PROJECT_SOURCE_DIR}/${header})
ENDFOREACH()
LIST(APPEND PROJECT_HEADERS_FULL_PATH ${PROJECT_BINARY_DIR}/include/hpp/fcl/config.hh)
add_library(${LIBRARY_NAME} add_library(${LIBRARY_NAME}
SHARED SHARED
${PROJECT_HEADERS_FULL_PATH}
${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_SOURCES}
) )
# IDE sources and headers sorting
ADD_SOURCE_GROUP(${LIBRARY_NAME}_SOURCES)
ADD_HEADER_GROUP(PROJECT_HEADERS_FULL_PATH)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
PUBLIC PUBLIC
Boost::thread Boost::thread
...@@ -102,7 +112,7 @@ target_include_directories(${LIBRARY_NAME} ...@@ -102,7 +112,7 @@ target_include_directories(${LIBRARY_NAME}
target_include_directories(${LIBRARY_NAME} target_include_directories(${LIBRARY_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} assimp) 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")
......
Markdown is supported
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