Skip to content
Snippets Groups Projects
Verified Commit ce7372a3 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix packaging

parent 672a44b5
No related branches found
No related tags found
No related merge requests found
......@@ -7,16 +7,6 @@ FUNCTION(ADD_PINOCCHIO_CPP_EXAMPLE EXAMPLE)
SET(EXAMPLE_NAME "example-cpp-${EXAMPLE_NAME}")
ADD_UNIT_TEST(${EXAMPLE_NAME} ${EXAMPLE})
TARGET_LINK_LIBRARIES(${EXAMPLE_NAME} PUBLIC ${PROJECT_NAME})
PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} eigen3)
IF(URDFDOM_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} urdfdom)
ENDIF(URDFDOM_FOUND)
IF(HPP_FCL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} hpp-fcl)
ENDIF(HPP_FCL_FOUND)
IF(CPPAD_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} "cppad")
ENDIF(CPPAD_FOUND)
ENDFUNCTION()
SET(${PROJECT_NAME}_EXAMPLES
......
......@@ -5,6 +5,6 @@
IF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT AND BUILD_WITH_URDF_SUPPORT)
ADD_PINOCCHIO_CPP_EXAMPLE(codegen-crba)
SET_PROPERTY(TARGET example-cpp-codegen-crba PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(example-cpp-codegen-crba ${CMAKE_DL_LIBS})
TARGET_LINK_LIBRARIES(example-cpp-codegen-crba PUBLIC ${CMAKE_DL_LIBS} cppadcg::cppadcg)
ENDIF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT AND BUILD_WITH_URDF_SUPPORT)
......@@ -32,17 +32,8 @@ MACRO(ADD_PINOCCHIO_UNIT_TEST NAME)
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC ${PKG}::${PKG})
ENDFOREACH(PKG)
IF(URDFDOM_FOUND AND (UNIX OR "${CMAKE_GENERATOR_TOOLSET}" MATCHES "ClangCl"))
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC urdfdom::urdfdom)
ENDIF(URDFDOM_FOUND AND (UNIX OR "${CMAKE_GENERATOR_TOOLSET}" MATCHES "ClangCl"))
IF(HPP_FCL_FOUND)
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC hpp-fcl::hpp-fcl)
ENDIF(HPP_FCL_FOUND)
TARGET_LINK_LIBRARIES(${TEST_NAME} PUBLIC ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(${TEST_NAME} PRIVATE ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
TARGET_LINK_LIBRARIES(${TEST_NAME} PRIVATE ${Boost_FILESYSTEM_LIBRARY})
ENDMACRO(ADD_PINOCCHIO_UNIT_TEST)
# --- RULES -------------------------------------------------------------------
......@@ -147,13 +138,14 @@ ENDIF(BUILD_ADVANCED_TESTING)
MACRO(ADD_CPPAD_UNIT_TEST name)
ADD_PINOCCHIO_UNIT_TEST(${name} cppad)
ADD_DEPENDENCIES(test-cppad test-cpp-${name})
TARGET_LINK_LIBRARIES(test-cpp-${name} PUBLIC cppad::cppad)
ENDMACRO()
MACRO(ADD_CPPADCG_UNIT_TEST name)
ADD_PINOCCHIO_UNIT_TEST(${name} cppadcg)
SET_PROPERTY(TARGET test-cpp-${name} PROPERTY CXX_STANDARD 11)
ADD_DEPENDENCIES(test-cppadcg test-cpp-${name})
TARGET_LINK_LIBRARIES(test-cpp-${name} ${CMAKE_DL_LIBS})
TARGET_LINK_LIBRARIES(test-cpp-${name} PUBLIC ${CMAKE_DL_LIBS} cppadcg::cppadcg)
ENDMACRO()
IF(BUILD_WITH_AUTODIFF_SUPPORT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment