Commit cdea5a84 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub

Merge pull request #101 from wxmerkt/wxm-add-cmake

Add CMake config using pkg-config internally
parents 42b47bff 7854c0fc
......@@ -65,7 +65,7 @@ FIND_NUMPY()
INCLUDE_DIRECTORIES(SYSTEM ${NUMPY_INCLUDE_DIRS})
# ----------------------------------------------------
# --- DEPENDANCIES -----------------------------------
# --- DEPENDENCIES -----------------------------------
# ----------------------------------------------------
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.0.5")
......@@ -140,6 +140,9 @@ TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:-bigobj
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
INSTALL(TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
PUBLIC_HEADER
INCLUDES DESTINATION ${CMAKE_INSTALL_PREFIX}/include
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
......@@ -150,10 +153,17 @@ ADD_SOURCE_GROUP(${PROJECT_NAME}_SOURCES)
INCLUDE(GenerateExportHeader)
GENERATE_EXPORT_HEADER(${PROJECT_NAME} EXPORT_FILE_NAME eigenpy/${PROJECT_NAME}_export.h)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
SET(PUBLIC_HEADER ${${PROJECT_NAME}_HEADERS})
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/eigenpy/${PROJECT_NAME}_export.h
DESTINATION include/eigenpy)
# This is a temporary work-around to fix MoveIt until jrl-cmakemodules
# can correctly create non-target CMake configs
install(FILES eigenpyConfig.cmake DESTINATION share/eigenpy/cmake)
install(FILES package.xml DESTINATION share/eigenpy)
# ----------------------------------------------------
# --- PYTHON LIBRARY ---------------------------------
# ----------------------------------------------------
......
Subproject commit 9b9f18fc79e2b4e85a95ed8080b9c1d2eea3db2c
Subproject commit 046c3be5553c4ea340eb672d0289627f0c07b1a4
cmake_minimum_required(VERSION 2.8.3)
message(STATUS "Loading eigenpy from PkgConfig")
find_package(PkgConfig)
pkg_check_modules(eigenpy REQUIRED eigenpy)
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