CMakeLists.txt 690 Bytes
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

3
4
5
6
7
8
9
10
11
SET(plugins
  traces/tracer
  traces/tracer-real-time
  )

SET(tracer-real-time_deps tracer)

FOREACH(plugin ${plugins})
  GET_FILENAME_COMPONENT(LIBRARY_NAME ${plugin} NAME)
Guilhem Saurel's avatar
Guilhem Saurel committed
12
  ADD_LIBRARY(${LIBRARY_NAME} SHARED "${plugin}.cpp")
13
14
15
16

  IF(SUFFIX_SO_VERSION)
    SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
  ENDIF(SUFFIX_SO_VERSION)
Guilhem Saurel's avatar
Guilhem Saurel committed
17
  SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH $ORIGIN)
18
19
20
21
22
23

  TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME} ${${LIBRARY_NAME}_deps})

  INSTALL(TARGETS ${LIBRARY_NAME} EXPORT ${TARGETS_EXPORT_NAME}
    DESTINATION ${DYNAMIC_GRAPH_PLUGINDIR})
ENDFOREACH(plugin)