Commit f254a900 authored by jcarpent's avatar jcarpent Committed by Justin Carpentier
Browse files

[CMake] Rework packaging

parent 6e395786
......@@ -48,8 +48,13 @@ SET(${PROJECT_NAME}_MULTIBODY_SOURCES
multibody/parser/sample-models.cpp
)
SET(${PROJECT_NAME}_MULTIBODY_PARSER_PYTHON_SOURCES
multibody/parser/python.cpp
)
SET(${PROJECT_NAME}_SOURCES
${${PROJECT_NAME}_MULTIBODY_SOURCES}
${${PROJECT_NAME}_MULTIBODY_PARSER_PYTHON_SOURCES}
)
IF(LUA5_1_FOUND)
......@@ -60,6 +65,35 @@ IF(LUA5_1_FOUND)
LIST(APPEND ${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_MULTIBODY_PARSER_LUA_SOURCES})
ENDIF(LUA5_1_FOUND)
IF(UNIX)
# Create target libpinocchio.so
ADD_LIBRARY ( ${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES} )
SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES})
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
IF(URDFDOM_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} urdfdom)
IF(HPP_FCL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} assimp)
ENDIF(HPP_FCL_FOUND)
ENDIF(URDFDOM_FOUND)
IF(HPP_FCL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} hpp-fcl)
ADD_TARGET_CFLAGS (${PROJECT_NAME} "-DWITH_HPP_FCL")
ENDIF(HPP_FCL_FOUND)
IF(LUA5_1_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} lua5.1)
ENDIF(LUA5_1_FOUND)
ADD_HEADER_GROUP(HEADERS)
ADD_SOURCE_GROUP(${PROJECT_NAME}_SOURCES)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
ENDIF(UNIX)
# ----------------------------------------------------
# --- PYTHON -----------------------------------------
......
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