Skip to content
Snippets Groups Projects
Commit 93cb53c4 authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Adapted to cmake plural variables *_DIRS and *_LIBRARIES

parent 17471b54
No related branches found
No related tags found
No related merge requests found
#edit the following line to add the librarie's header files
FIND_PATH(ptu_d46_INCLUDE_DIRS ptu_commands.h ptu_d46.h ptu_d46_exceptions.h /usr/include/iri/ptu_d46 /usr/local/include/iri/ptu_d46)
FIND_PATH(ptu_d46_INCLUDE_DIRS ptu_commands.h ptu_d46.h ptu_d46_exceptions.h /usr/include/iridrivers /usr/local/include/iri/ptu_d46 /usr/include/iri/ptu_d46)
FIND_LIBRARY(ptu_d46_LIBRARIES
NAMES ptu_d46
PATHS /usr/lib /usr/lib/iri/ptu_d46 /usr/local/lib /usr/local/lib/iri/ptu_d46)
PATHS /usr/local/lib/iridrivers /usr/local/lib/iri/ptu_d46 /usr/lib/iri/ptu_d46)
SET(ptu_d46_INCLUDE_DIR ${ptu_d46_INCLUDE_DIRS})
SET(ptu_d46_LIBRARY ${ptu_d46_LIBRARIES})
......
......@@ -12,9 +12,9 @@ FIND_PACKAGE(trajectory REQUIRED)
# edit the following line to add the necessary include directories
INCLUDE_DIRECTORIES(. ../include)
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${trajectory_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${trajectory_INCLUDE_DIRS})
SET_SOURCE_FILES_PROPERTIES(${XSD_SOURCES} PROPERTIES GENERATED 1)
......@@ -23,10 +23,10 @@ ADD_LIBRARY(ptu_d46 SHARED ${sources} ${XSD_SOURCES})
ADD_DEPENDENCIES(ptu_d46 xsd_files_gen)
#edit the following line to add the necessary system libraries (if any)
TARGET_LINK_LIBRARIES(ptu_d46 ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(ptu_d46 ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(ptu_d46 ${XSD_LIBRARY})
TARGET_LINK_LIBRARIES(ptu_d46 ${trajectory_LIBRARY})
TARGET_LINK_LIBRARIES(ptu_d46 ${iriutils_LIBRARIES})
TARGET_LINK_LIBRARIES(ptu_d46 ${comm_LIBRARIES})
TARGET_LINK_LIBRARIES(ptu_d46 ${XSD_LIBRARIES})
TARGET_LINK_LIBRARIES(ptu_d46 ${trajectory_LIBRARIES})
INSTALL(TARGETS ptu_d46
RUNTIME DESTINATION bin
......
......@@ -4,14 +4,16 @@ 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)
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_PATH ${CMAKE_CURRENT_SOURCE_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