Commit 27e9f63b authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

WIP

parent 685511f9
Pipeline #2041 failed with stage
in 2 minutes and 14 seconds
......@@ -13,13 +13,13 @@
# received a copy of the GNU Lesser General Public License along with
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/pthread.cmake)
INCLUDE(cmake/cpack.cmake)
INCLUDE(cmake/test.cmake)
SET(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME dynamic-graph)
......@@ -30,42 +30,38 @@ SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")
SET(DOXYGEN_USE_MATHJAX YES)
# Defines paths.
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SETUP_PROJECT()
# Add configuration headers for plug-ins.
GENERATE_CONFIGURATION_HEADER(
${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS)
GENERATE_CONFIGURATION_HEADER(
${HEADER_DIR}
config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS)
GENERATE_CONFIGURATION_HEADER(
${HEADER_DIR}
config-contiifstream.hh DG_CONTIIFSTREAM contiifstream_EXPORTS)
#GENERATE_CONFIGURATION_HEADER(
#${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS)
#GENERATE_CONFIGURATION_HEADER(
#${HEADER_DIR}
#config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS)
#GENERATE_CONFIGURATION_HEADER(
#${HEADER_DIR}
#config-contiifstream.hh DG_CONTIIFSTREAM contiifstream_EXPORTS)
# FIXME: to be changed into lib/dynamic-graph
# to avoid name collision when installing dynamic-graph in /usr.
SET(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/plugin")
#SET(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/plugin")
# Add extra keys to pkg-config file to export the location of the
# plug-in directory in a robust manner.
SET(PKG_CONFIG_EXTRA "plugindir=${PLUGINDIR}")
#SET(PKG_CONFIG_EXTRA "plugindir=${PLUGINDIR}")
SET(BOOST_COMPONENTS thread unit_test_framework)
# Add dependency toward dynamic graph library in pkg-config file.
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
# Search for Boost.
SEARCH_FOR_BOOST()
SEARCH_FOR_PTHREAD()
# Search for Boost.
SEARCH_FOR_EIGEN()
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(include/${PROJECT_NAME})
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_CPACK()
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
#
# This file is part of dynamic-graph.
# dynamic-graph is free software:
# dynamic-graph is free software:
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
......@@ -26,18 +26,13 @@
####################################
### Main Library
####################################
SET(LIBRARY_NAME ${PROJECT_NAME})
# Verbosity level
IF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
ENDIF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
#IF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
#ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
#ENDIF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
# Declare boost include directories
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
ADD_LIBRARY(${LIBRARY_NAME}
ADD_LIBRARY(${PROJECT_NAME}
SHARED
debug/debug.cpp
debug/real-time-logger.cpp
......@@ -59,44 +54,44 @@ ADD_LIBRARY(${LIBRARY_NAME}
command/command.cpp
)
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
IF (UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CMAKE_DL_LIBS} pthread)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CMAKE_DL_LIBS} pthread)
ENDIF (UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES})
#IF (UNIX AND NOT APPLE)
# TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${JRL_MAL_LDFLAGS_OTHER})
# TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${JRL_MAL_LDFLAGS_OTHER})
#ENDIF (UNIX AND NOT APPLE)
INSTALL(TARGETS ${LIBRARY_NAME}
INSTALL(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
####################################
### Plugins
####################################
SET(plugins_list
traces/tracer
traces/tracer-real-time
)
#SET(plugins_list
#traces/tracer
#traces/tracer-real-time
#)
SET(tracer-real-time_dependency tracer)
#SET(tracer-real-time_dependency tracer)
FOREACH(plugin_file ${plugins_list})
GET_FILENAME_COMPONENT(plugin ${plugin_file} NAME)
ADD_LIBRARY(${plugin} SHARED "${plugin_file}.cpp")
#FOREACH(plugin_file ${plugins_list})
#GET_FILENAME_COMPONENT(plugin ${plugin_file} NAME)
#ADD_LIBRARY(${plugin} SHARED "${plugin_file}.cpp")
TARGET_LINK_LIBRARIES(${plugin}
${PROJECT_NAME} ${${plugin}_dependency}
${Boost_LIBRARIES})
#TARGET_LINK_LIBRARIES(${plugin}
#${PROJECT_NAME} ${${plugin}_dependency}
#${Boost_LIBRARIES})
SET_TARGET_PROPERTIES(${plugin}
PROPERTIES
PREFIX ""
)
#SET_TARGET_PROPERTIES(${plugin}
#PROPERTIES
#PREFIX ""
#)
INSTALL(TARGETS ${plugin} DESTINATION ${PLUGINDIR})
ENDFOREACH(plugin_file)
#INSTALL(TARGETS ${plugin} DESTINATION ${PLUGINDIR})
#ENDFOREACH(plugin_file)
......@@ -15,14 +15,11 @@
ADD_DEFINITIONS(-DDEBUG=2)
# Add Boost path to include directories.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
ADD_DEFINITIONS(-DTESTS_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data")
ADD_DEFINITIONS(-DTESTS_PLUGINDIR="${LIBRARY_OUTPUT_PATH}")
ADD_DEFINITIONS(-DTESTS_PLUGINDIR="${CMAKE_INSTALL_LIBDIR}")
ADD_DEFINITIONS(-DTESTS_DYNLIBSUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}")
# DYNAMIC_GRAPH_TEST(NAME)
......
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