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

Adapted to CMake plural variables *_DIRS and *_LIBRARIES

parent b4b9415b
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(asterx1_gps_INCLUDE_DIR asterx1_gps.h asterx1exceptions.h stream_gps.h gps_types.h /usr/local/include/iri/asterx1_gps /usr/include/iri/asterx1_gps)
FIND_LIBRARY(asterx1_gps_LIBRARY
FIND_LIBRARY(asterx1_gps_LIBRARIES
NAMES asterx1_gps
PATHS /usr/local/lib/iri/asterx1_gps /usr/lib/iri/asterx1_gps)
IF (asterx1_gps_INCLUDE_DIR AND asterx1_gps_LIBRARY)
IF (asterx1_gps_INCLUDE_DIRS AND asterx1_gps_LIBRARIES)
SET(asterx1_gps_FOUND TRUE)
ENDIF (asterx1_gps_INCLUDE_DIR AND asterx1_gps_LIBRARY)
ENDIF (asterx1_gps_INCLUDE_DIRS AND asterx1_gps_LIBRARIES)
SET(asterx1_gps_INCLUDE_DIR ${asterx1_gps_INCLUDE_DIRS})
SET(asterx1_gps_LIBRARY ${asterx1_gps_LIBRARIES})
IF (asterx1_gps_FOUND)
IF (NOT asterx1_gps_FIND_QUIETLY)
MESSAGE(STATUS "Found asterx1_gps: ${asterx1_gps_LIBRARY}")
MESSAGE(STATUS "Found asterx1_gps: ${asterx1_gps_LIBRARIES}")
ENDIF (NOT asterx1_gps_FIND_QUIETLY)
ELSE (asterx1_gps_FOUND)
IF (asterx1_gps_FIND_REQUIRED)
......
#edit the following line to add the librarie's header files
FIND_PATH(asterx1_process_INCLUDE_DIR asterx1_process.h gps_types.h /usr/local/include/iri/asterx1_gps /usr/include/iri/asterx1_gps)
FIND_LIBRARY(asterx1_process_LIBRARY
FIND_LIBRARY(asterx1_process_LIBRARIES
NAMES asterx1_process
PATHS /usr/local/lib/iri/asterx1_gps /usr/lib/iri/asterx1_gps)
IF (asterx1_process_INCLUDE_DIR AND asterx1_process_LIBRARY)
IF (asterx1_process_INCLUDE_DIRS AND asterx1_process_LIBRARIES)
SET(asterx1_process_FOUND TRUE)
ENDIF (asterx1_process_INCLUDE_DIR AND asterx1_process_LIBRARY)
ENDIF (asterx1_process_INCLUDE_DIRS AND asterx1_process_LIBRARIES)
SET(asterx1_process_INCLUDE_DIR ${asterx1_process_INCLUDE_DIRS})
SET(asterx1_process_LIBRARY ${asterx1_process_LIBRARIES})
IF (asterx1_process_FOUND)
IF (NOT asterx1_process_FIND_QUIETLY)
MESSAGE(STATUS "Found asterx1_process: ${asterx1_process_LIBRARY}")
MESSAGE(STATUS "Found asterx1_process: ${asterx1_process_LIBRARIES}")
ENDIF (NOT asterx1_process_FIND_QUIETLY)
ELSE (asterx1_process_FOUND)
IF (asterx1_process_FIND_REQUIRED)
......
......@@ -16,15 +16,15 @@ FIND_PACKAGE(comm)
# add the necessary include directories
INCLUDE_DIRECTORIES(../include/)
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${comm_INCLUDE_DIRS})
# create the shared library
ADD_LIBRARY(asterx1_gps SHARED ${sources})
# link necessary libraries
TARGET_LINK_LIBRARIES(asterx1_gps ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(asterx1_gps ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(asterx1_gps ${iriutils_LIBRARIES})
TARGET_LINK_LIBRARIES(asterx1_gps ${comm_LIBRARIES})
INSTALL(TARGETS asterx1_gps
RUNTIME DESTINATION bin
......@@ -43,8 +43,8 @@ IF(gpstk_LIBRARY)
# create the shared library
ADD_LIBRARY(asterx1_process SHARED ${process_sources})
TARGET_LINK_LIBRARIES(asterx1_process ${iriutils_LIBRARY})
TARGET_LINK_LIBRARIES(asterx1_process ${comm_LIBRARY})
TARGET_LINK_LIBRARIES(asterx1_process ${iriutils_LIBRARIES})
TARGET_LINK_LIBRARIES(asterx1_process ${comm_LIBRARIES})
TARGET_LINK_LIBRARIES(asterx1_process gpstk)
INSTALL(TARGETS asterx1_process
......
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