Commit 0408bd8e authored by Olivier Stasse's avatar Olivier Stasse Committed by olivier stasse
Browse files

[cmake] Switch to CMake export

parent a868b338
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/pthread.cmake)
SET(PROJECT_ORG stack-of-tasks) SET(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME dynamic-graph) SET(PROJECT_NAME dynamic-graph)
...@@ -13,6 +9,16 @@ SET(PROJECT_DESCRIPTION "Dynamic graph library") ...@@ -13,6 +9,16 @@ SET(PROJECT_DESCRIPTION "Dynamic graph library")
SET(PROJECT_URL "http://github.com/${PROJECT_ORG}/${PROJECT_NAME}") SET(PROJECT_URL "http://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
SET(PROJECT_SUFFIX "-v3") SET(PROJECT_SUFFIX "-v3")
INCLUDE(cmake/base.cmake)
PROJECT(${PROJECT_NAME} CXX)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/pthread.cmake)
# Export CMake Target
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}") SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
SET(DOXYGEN_USE_MATHJAX YES) SET(DOXYGEN_USE_MATHJAX YES)
...@@ -20,8 +26,6 @@ SET(DOXYGEN_USE_MATHJAX YES) ...@@ -20,8 +26,6 @@ SET(DOXYGEN_USE_MATHJAX YES)
# Defines paths. # Defines paths.
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SETUP_PROJECT()
# Add configuration headers for plug-ins. # Add configuration headers for plug-ins.
GENERATE_CONFIGURATION_HEADER( GENERATE_CONFIGURATION_HEADER(
${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS) ${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS)
...@@ -53,3 +57,4 @@ ADD_SUBDIRECTORY(include/${PROJECT_NAME}) ...@@ -53,3 +57,4 @@ ADD_SUBDIRECTORY(include/${PROJECT_NAME})
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
SETUP_PROJECT_FINALIZE() SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_PACKAGE_FINALIZE()
...@@ -50,6 +50,6 @@ SET(${PROJECT_NAME}_HEADERS ...@@ -50,6 +50,6 @@ SET(${PROJECT_NAME}_HEADERS
logger.h logger.h
) )
INSTALL(FILES ${${PROJECT_NAME}_HEADERS} INSTALL(FILES ${${PROJECT_NAME}_HEADERS}
DESTINATION include/${PROJECT_NAME} DESTINATION include/${PROJECT_NAME}
) )
...@@ -54,6 +54,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES}) ...@@ -54,6 +54,7 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
#ENDIF (UNIX AND NOT APPLE) #ENDIF (UNIX AND NOT APPLE)
INSTALL(TARGETS ${LIBRARY_NAME} INSTALL(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}) DESTINATION ${CMAKE_INSTALL_LIBDIR})
#################################### ####################################
...@@ -79,5 +80,5 @@ FOREACH(plugin_file ${plugins_list}) ...@@ -79,5 +80,5 @@ FOREACH(plugin_file ${plugins_list})
PREFIX "" PREFIX ""
) )
INSTALL(TARGETS ${plugin} DESTINATION ${PLUGINDIR}) INSTALL(TARGETS ${plugin} EXPORT ${TARGET_NAME} DESTINATION ${PLUGINDIR})
ENDFOREACH(plugin_file) ENDFOREACH(plugin_file)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment