Skip to content
Snippets Groups Projects
Commit 9f2e31fb authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Fix camke for URDF

parent caa92c7c
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,6 @@ endif()
#######################################################################################
#options
OPTION (Simox_USE_RBDL "Use RBDL" OFF)
OPTION (Simox_USE_URDF "Use URDF" OFF)
OPTION (Simox_USE_NLOPT "Use NLOPT" ON)
OPTION(SimDynamics_USE_BULLET "Use Bullet Physics Engine" ON)
OPTION(Simox_USE_COIN_VISUALIZATION "Use Coin3D for visualization" ON)
......@@ -87,6 +86,9 @@ MESSAGE (STATUS "** SIMOX INSTALL DATA DIR : ${Simox_INSTALL_DATA_DIR}")
MESSAGE (STATUS "** SIMOX INSTALL HEADER DIR: ${Simox_INSTALL_HEADER_DIR}")
MESSAGE(STATUS "** Simox build directory: ${CMAKE_BINARY_DIR}")
###########################################################
include(SearchForTinyXML)
FIND_PACKAGE(urdfdom)
########################### IDE settings ################################
# use virtual folders for grouping projects in IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
......
......@@ -700,26 +700,21 @@ elseif (Simox_VISUALIZATION AND Simox_USE_OPENSCENEGRAPH_VISUALIZATION)
endif ()
#check for URDF
if (Simox_USE_URDF)
include(SearchForTinyXML)
FIND_PACKAGE(urdfdom)
if (tinyxml_library AND URDF_FOUND)
MESSAGE(STATUS " ** Including URDF importer")
SET(SOURCES
${SOURCES}
Import/URDF/SimoxURDFFactory.cpp
)
SET(INCLUDES
${INCLUDES}
Import/URDF/SimoxURDFFactory.h
)
target_link_libraries(VirtualRobot PUBLIC ${URDFDOM_LIBRARIES})
else()
MESSAGE(STATUS " *** urdfDom or TinyXML not found: skipping URDF importer...")
endif()
if (tinyxml_library AND URDF_FOUND)
MESSAGE(STATUS " ** Including URDF importer")
SET(SOURCES
${SOURCES}
Import/URDF/SimoxURDFFactory.cpp
)
SET(INCLUDES
${INCLUDES}
Import/URDF/SimoxURDFFactory.h
)
target_link_libraries(VirtualRobot PUBLIC ${URDFDOM_LIBRARIES})
else()
MESSAGE(STATUS " *** urdfDom or TinyXML not found: skipping URDF importer...")
endif()
# include collision detection
......@@ -762,7 +757,7 @@ if (Simox_USE_NLOPT AND NLOPT_FOUND)
endif()
if (Simox_USE_URDF AND tinyxml_library AND URDF_FOUND)
if (tinyxml_library AND URDF_FOUND)
target_include_directories(VirtualRobot SYSTEM PUBLIC ${tinyxml_include_dirs})
target_compile_options(VirtualRobot PUBLIC ${tinyxml_library_dirs})
target_compile_definitions(VirtualRobot PUBLIC ${tinyxml_cflags} -DTIXML_USE_STL)
......
PROJECT ( loadURDFRobot )
FIND_PACKAGE(urdfdom)
include(SearchForTinyXML)
if (tinyxml_library AND URDF_FOUND)
ADD_EXECUTABLE(${PROJECT_NAME} loadURDFobot.cpp)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${Simox_BIN_DIR})
......
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