Skip to content
Snippets Groups Projects
Commit 1e7c6d99 authored by Peter Kaiser's avatar Peter Kaiser
Browse files

Revert "Move urdf importer to a separate lib and always build it when all...

Revert "Move urdf importer to a separate lib and always build it when all dependencies are available"

This reverts commit 7cd6f160.
parent 310d772e
No related branches found
No related tags found
No related merge requests found
......@@ -465,7 +465,43 @@ endif ()
# )
#endif ()
ADD_SUBDIRECTORY(Import/URDF)
#check for URDF
if (Simox_USE_URDF)
include(SearchForTinyXML)
FIND_PACKAGE(urdfdom)
#FIND_PACKAGE(PkgConfig)
#PKG_CHECK_MODULES(URDFDOM REQUIRED urdfdom>=0.2.9)
#PKG_CHECK_MODULES(URDFDOM_HEADERS REQUIRED urdfdom_headers>=0.2.3)
if (tinyxml_library AND URDF_FOUND)
MESSAGE(STATUS " ** Including URDF importer")
include_directories(SYSTEM ${tinyxml_include_dirs})
link_directories(${tinyxml_library_dirs})
add_definitions(${tinyxml_cflags})
add_definitions(" -DTIXML_USE_STL ")
INCLUDE_DIRECTORIES (SYSTEM
${URDFDOM_INCLUDE_DIRS}
${URDFDOM_PARSER_INCLUDE_DIRS}
${URDFDOM_HEADERS_INCLUDE_DIRS}
)
SET(SOURCES
${SOURCES}
Import/URDF/SimoxURDFFactory.cpp
)
SET(INCLUDES
${INCLUDES}
Import/URDF/SimoxURDFFactory.h
)
SET(Simox_EXTERNAL_LIBRARIES ${Simox_EXTERNAL_LIBRARIES} ${URDFDOM_LIBRARIES})
else()
MESSAGE(STATUS " *** urdfDom or TinyXML not found: skipping URDF importer...")
endif()
endif()
# include collision detection
INCLUDE (CollisionDetection/CMakeLists.txt)
......
PROJECT (VirtualRobotImportUrdf)
PROJECT (SIMOX_URDFREADER)
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake )
include(SearchForTinyXML)
FIND_PACKAGE(urdfdom)
#FIND_PACKAGE(PkgConfig)
#PKG_CHECK_MODULES(URDFDOM REQUIRED urdfdom>=0.2.9)
#PKG_CHECK_MODULES(URDFDOM_HEADERS REQUIRED urdfdom_headers>=0.2.3)
if (tinyxml_library AND URDF_FOUND)
message(STATUS "Building VirtualRobotImportUrdf")
include_directories(SYSTEM ${tinyxml_include_dirs})
link_directories(${tinyxml_library_dirs})
add_definitions(${tinyxml_cflags})
add_definitions("-DTIXML_USE_STL")
FIND_PACKAGE(simox REQUIRED)
INCLUDE_DIRECTORIES (
${URDFDOM_INCLUDE_DIRS}
${URDFDOM_PARSER_INCLUDE_DIRS}
${URDFDOM_HEADERS_INCLUDE_DIRS}
)
setupSimoxExternalLibraries()
SET ( SOURCES SimoxURDFFactory.cpp)
SET ( HEADERS SimoxURDFFactory.h )
SET (CMAKE_SKIP_BUILD_RPATH FALSE)
SET (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ADD_LIBRARY ( VirtualRobotImportUrdf SHARED ${SOURCES} ${HEADERS} )
SET ( URDFIMPORT_SOURCES
SimoxURDFFactory.cpp
)
SET ( URDFIMPORT_HEADERS
SimoxURDFFactory.h
)
ADD_LIBRARY ( simox_urdfimport SHARED ${URDFIMPORT_SOURCES} ${URDFIMPORT_HEADERS} )
add_definitions("-DDEMO_BASE_PATH=\"${PROJECT_SOURCE_DIR}\"")
ADD_EXECUTABLE (loadURDFobot loadURDFobot.cpp)
TARGET_LINK_LIBRARIES (VirtualRobotImportUrdf VirtualRobot ${URDFDOM_LIBRARIES})
else()
if (NOT tinyxml_library)
message(STATUS "Not building VirtualRobotImportUrdf: tinyxml not found")
endif()
if (NOT URDF_FOUND)
message(STATUS "Not building VirtualRobotImportUrdf: urdfdom not found")
endif()
TARGET_LINK_LIBRARIES (simox_urdfimport VirtualRobot ${URDFDOM_LIBRARIES})
TARGET_LINK_LIBRARIES(loadURDFobot simox_urdfimport VirtualRobot ${URDFDOM_LIBRARIES})
endif()
PROJECT ( loadURDFRobot )
if (TARGET VirtualRobotImportUrdf)
if (tinyxml_library AND URDF_FOUND)
include_directories(SYSTEM ${tinyxml_include_dirs})
link_directories(${tinyxml_library_dirs})
......@@ -17,7 +17,7 @@ if (TARGET VirtualRobotImportUrdf)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${Simox_BIN_DIR})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES FOLDER "Examples")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} VirtualRobot VirtualRobotImportUrdf ${URDFDOM_LIBRARIES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} VirtualRobot ${URDFDOM_LIBRARIES})
#######################################################################################
......
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