diff --git a/Finddynamixel_motor_cont.cmake b/Finddynamixel_motor_cont.cmake index 637d14611f40fc7d8e7ce78ac5cf97eae558b0b3..b29c47fe75e6522d66abe3bea50ffc544cef1be3 100644 --- a/Finddynamixel_motor_cont.cmake +++ b/Finddynamixel_motor_cont.cmake @@ -1,21 +1,21 @@ #edit the following line to add the librarie's header files -FIND_PATH(dynamixel_motor_cont_INCLUDE_DIR dynamixel_motor.h dynamixel_motor_group.h dynamixel_registers.h dynamixel_motor_exceptions.h +FIND_PATH(dynamixel_motor_cont_INCLUDE_DIRS dynamixel_motor.h dynamixel_motor_group.h dynamixel_registers.h dynamixel_motor_exceptions.h /usr/local/include/iridrivers /usr/local/include/iri/dynamixel_motor_cont /usr/include/iri/dynamixel_motor_cont) -FIND_LIBRARY(dynamixel_motor_cont_LIBRARY +FIND_LIBRARY(dynamixel_motor_cont_LIBRARIES NAMES dynamixel_motor_cont PATHS /usr/local/lib/iridrivers /usr/local/lib/iri/dynamixel_motor_cont /usr/lib/iri/dynamixel_motor_cont) -SET(dynamixel_motor_cont_INCLUDE_DIRS ${dynamixel_motor_cont_INCLUDE_DIR}) -SET(dynamixel_motor_cont_LIBRARIES ${dynamixel_motor_cont_LIBRARY}) +SET(dynamixel_motor_cont_INCLUDE_DIR ${dynamixel_motor_cont_INCLUDE_DIRS}) +SET(dynamixel_motor_cont_LIBRARY ${dynamixel_motor_cont_LIBRARIES}) -IF (dynamixel_motor_cont_INCLUDE_DIR AND dynamixel_motor_cont_LIBRARY) +IF (dynamixel_motor_cont_INCLUDE_DIRS AND dynamixel_motor_cont_LIBRARIES) SET(dynamixel_motor_cont_FOUND TRUE) -ENDIF (dynamixel_motor_cont_INCLUDE_DIR AND dynamixel_motor_cont_LIBRARY) +ENDIF (dynamixel_motor_cont_INCLUDE_DIRS AND dynamixel_motor_cont_LIBRARIES) IF (dynamixel_motor_cont_FOUND) IF (NOT dynamixel_motor_cont_FIND_QUIETLY) - MESSAGE(STATUS "Found dynamixel_motor_cont: ${dynamixel_motor_cont_LIBRARY}") + MESSAGE(STATUS "Found dynamixel_motor_cont: ${dynamixel_motor_cont_LIBRARIES}") ENDIF (NOT dynamixel_motor_cont_FIND_QUIETLY) ELSE (dynamixel_motor_cont_FOUND) IF (dynamixel_motor_cont_FIND_REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 42f47f7c3cca019d8378bae533bb068bcda444f6..823bb3260fc7198b91da8d4394548bb67d034a48 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,14 +16,14 @@ FIND_PACKAGE(dynamixel REQUIRED) FIND_PACKAGE(trajectory REQUIRED) # edit the following line to add the necessary include directories -INCLUDE_DIRECTORIES(. ${iriutils_INCLUDE_DIR} ${comm_INCLUDE_DIR} ${dynamixel_INCLUDE_DIR} ${trajectory_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(. ${iriutils_INCLUDE_DIRS} ${comm_INCLUDE_DIRS} ${dynamixel_INCLUDE_DIRS} ${trajectory_INCLUDE_DIRS}) SET_SOURCE_FILES_PROPERTIES(${XSD_SOURCES} PROPERTIES GENERATED 1) ADD_LIBRARY(dynamixel_motor_cont SHARED ${sources} ${XSD_SOURCES}) #edit the following line to add the necessary system libraries (if any) -TARGET_LINK_LIBRARIES(dynamixel_motor_cont ${iriutils_LIBRARY} ${comm_LIBRARY} ${dynamixel_LIBRARY} ${XSD_LIBRARY} ${trajectory_LIBRARY}) +TARGET_LINK_LIBRARIES(dynamixel_motor_cont ${iriutils_LIBRARIES} ${comm_LIBRARIES} ${dynamixel_LIBRARIES} ${XSD_LIBRARIES} ${trajectory_LIBRARIES}) ADD_DEPENDENCIES(dynamixel_motor_cont xsd_files_gen) diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt index d8a5585ef4eb4132e81242e4d575e58434c7853d..2dea08f0b25c5f5f11532c400d93b332f0cd621c 100644 --- a/src/xml/CMakeLists.txt +++ b/src/xml/CMakeLists.txt @@ -4,15 +4,18 @@ IF(EXISTS "/usr/include/xsd/cxx") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_HAVE_XSD" PARENT_SCOPE) SET(XSD_FOUND TRUE) MESSAGE(STATUS "Found the XML library ... adding support for XML files") - FIND_LIBRARY(XSD_LIBRARY + FIND_LIBRARY(XSD_LIBRARIES NAMES xerces-c PATHS /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu/) + SET(XSD_LIBRARY ${XSD_LIBRARIES}) ELSE(EXISTS "/usr/include/xsd/cxx") MESSAGE(STATUS "XML library not found ... it will be impossible to handle XML files") ENDIF(EXISTS "/usr/include/xsd/cxx") IF(XSD_FOUND) + SET(XSD_LIBRARIES ${XSD_LIBRARIES} PARENT_SCOPE) SET(XSD_LIBRARY ${XSD_LIBRARY} PARENT_SCOPE) + SET(XSD_FILES dynamixel_motor_cfg_file.xsd dynamixel_motor_group_cfg_file.xsd) IF(XSD_FILES)