Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olivier Stasse
dynamic-graph
Commits
fb5d10a2
Commit
fb5d10a2
authored
5 years ago
by
Olivier Stasse
Committed by
olivier stasse
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] Fix CMake package
parent
cdafa127
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+174
-8
174 additions, 8 deletions
CMakeLists.txt
include/dynamic-graph/CMakeLists.txt
+2
-4
2 additions, 4 deletions
include/dynamic-graph/CMakeLists.txt
src/CMakeLists.txt
+15
-3
15 additions, 3 deletions
src/CMakeLists.txt
tests/CMakeLists.txt
+2
-2
2 additions, 2 deletions
tests/CMakeLists.txt
with
193 additions
and
17 deletions
CMakeLists.txt
+
174
−
8
View file @
fb5d10a2
...
@@ -9,15 +9,18 @@ SET(PROJECT_DESCRIPTION "Dynamic graph library")
...
@@ -9,15 +9,18 @@ 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"
)
# Export CMake Target
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
# Make sure that every header is generated in dynamic-graph
SET
(
CUSTOM_HEADER_DIR
${
PROJECT_NAME
}
)
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/base.cmake
)
PROJECT
(
${
PROJECT_NAME
}
CXX
)
PROJECT
(
${
PROJECT_NAME
}
CXX
)
INCLUDE
(
cmake/header.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/eigen.cmake
)
INCLUDE
(
cmake/pthread.cmake
)
INCLUDE
(
cmake/pthread.cmake
)
add_project_dependency
(
Eigen3 REQUIRED NO_MODULE
)
# Export CMake Target
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
SET
(
CUSTOM_HEADER_DIR
"
${
PROJECT_NAME
}
"
)
SET
(
CUSTOM_HEADER_DIR
"
${
PROJECT_NAME
}
"
)
...
@@ -33,6 +36,10 @@ GENERATE_CONFIGURATION_HEADER(
...
@@ -33,6 +36,10 @@ GENERATE_CONFIGURATION_HEADER(
${
HEADER_DIR
}
${
HEADER_DIR
}
config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS
)
config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS
)
set
(
PACKAGE_EXTRA_MACROS
"set (DYNAMIC_GRAPH_PLUGINDIR
\$
{CMAKE_CURRENT_LIST_DIR}/../../plugin)"
)
# Specific to PKG module
# FIXME: to be changed into lib/dynamic-graph
# FIXME: to be changed into lib/dynamic-graph
# to avoid name collision when installing dynamic-graph in /usr.
# to avoid name collision when installing dynamic-graph in /usr.
SET
(
PLUGINDIR
"
${
CMAKE_INSTALL_FULL_LIBDIR
}
/plugin"
)
SET
(
PLUGINDIR
"
${
CMAKE_INSTALL_FULL_LIBDIR
}
/plugin"
)
...
@@ -48,13 +55,172 @@ PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
...
@@ -48,13 +55,172 @@ PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
SET
(
BOOST_COMPONENTS serialization system unit_test_framework thread
)
SET
(
BOOST_COMPONENTS serialization system unit_test_framework thread
)
SEARCH_FOR_BOOST
()
SEARCH_FOR_BOOST
()
SEARCH_FOR_PTHREAD
()
SEARCH_FOR_PTHREAD
()
#SEARCH_FOR_EIGEN()
# Search for Boost.
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
SEARCH_FOR_EIGEN
()
#
####################################
### 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 \"\"
))
# Declare boost include directories
#include_directories(${Boost_INCLUDE_DIRS})
#link_directories(${Boost_LIBRARY_DIRS})
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED
src/debug/debug.cpp
src/debug/real-time-logger.cpp
src/debug/logger.cpp
src/dgraph/entity.cpp
src/dgraph/factory.cpp
src/dgraph/pool.cpp
src/exception/exception-abstract.cpp
src/exception/exception-factory.cpp
src/exception/exception-signal.cpp
src/exception/exception-traces.cpp
src/mt/process-list.cpp
src/signal/signal-array.cpp
src/signal/signal-caster.cpp
src/signal/signal-cast-helper.cpp
src/command/value.cpp
src/command/command.cpp
)
SET
(
${
PROJECT_NAME
}
_HEADERS
include/dynamic-graph/fwd.hh
include/dynamic-graph/null-ptr.hh
include/dynamic-graph/debug.h
include/dynamic-graph/real-time-logger.h
include/dynamic-graph/dynamic-graph-api.h
include/dynamic-graph/entity.h
include/dynamic-graph/factory.h
include/dynamic-graph/pool.h
include/dynamic-graph/exception-abstract.h
include/dynamic-graph/exception-factory.h
include/dynamic-graph/exception-signal.h
include/dynamic-graph/exception-traces.h
include/dynamic-graph/signal.h
include/dynamic-graph/signal-array.h
include/dynamic-graph/signal-base.h
include/dynamic-graph/signal-ptr.h
include/dynamic-graph/signal-time-dependent.h
include/dynamic-graph/signal-ptr.t.cpp
include/dynamic-graph/signal.t.cpp
include/dynamic-graph/time-dependency.h
include/dynamic-graph/time-dependency.t.cpp
include/dynamic-graph/signal-caster.h
include/dynamic-graph/signal-cast-helper.h
include/dynamic-graph/all-signals.h
include/dynamic-graph/signal-helper.h
include/dynamic-graph/entity-helper.h
include/dynamic-graph/tracer.h
include/dynamic-graph/tracer-real-time.h
include/dynamic-graph/command.h
include/dynamic-graph/eigen-io.h
include/dynamic-graph/linear-algebra.h
include/dynamic-graph/value.h
include/dynamic-graph/command-setter.h
include/dynamic-graph/command-setter.t.cpp
include/dynamic-graph/command-getter.h
include/dynamic-graph/command-getter.t.cpp
include/dynamic-graph/command-direct-getter.h
include/dynamic-graph/command-direct-setter.h
include/dynamic-graph/command-bind.h
include/dynamic-graph/all-commands.h
include/dynamic-graph/logger.h
)
SET
(
PUBLIC_HEADER
${${
PROJECT_NAME
}
_HEADERS
}
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
PUBLIC_HEADER
INCLUDES DESTINATION include
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
# We need to include Eigen3 because the CMakeFile at 16.04 LTS
# is not so modern.
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_LIST_DIR
}
/include>
$<BUILD_INTERFACE:
${
EIGEN3_INCLUDE_DIR
}
>
INTERFACE
${
EIGEN3_INCLUDE_DIR
}
$<INSTALL_INTERFACE:include>
)
SET_TARGET_PROPERTIES
(
${
LIBRARY_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
IF
(
UNIX
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
CMAKE_DL_LIBS
}
pthread
)
ENDIF
(
UNIX
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
)
#IF (UNIX AND NOT APPLE)
# TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${JRL_MAL_LDFLAGS_OTHER})
#ENDIF (UNIX AND NOT APPLE)
####################################
### Plugins
####################################
SET
(
plugins_list
src/traces/tracer
src/traces/tracer-real-time
)
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"
)
TARGET_LINK_LIBRARIES
(
${
plugin
}
${
PROJECT_NAME
}
${${
plugin
}
_dependency
}
${
Boost_LIBRARIES
}
)
SET_TARGET_PROPERTIES
(
${
plugin
}
PROPERTIES
PREFIX
""
)
INSTALL
(
TARGETS
${
plugin
}
EXPORT
${
TARGET_NAME
}
DESTINATION
${
PLUGINDIR
}
)
ENDFOREACH
(
plugin_file
)
ADD_SUBDIRECTORY
(
src
)
ADD_SUBDIRECTORY
(
include/
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
include/
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
tests
)
ADD_SUBDIRECTORY
(
tests
)
SETUP_PROJECT_FINALIZE
()
#SETUP_PROJECT_FINALIZE()
SETUP_PROJECT_PACKAGE_FINALIZE
()
SETUP_PROJECT_PACKAGE_FINALIZE
()
get_cmake_property
(
_variableNames VARIABLES
)
list
(
SORT _variableNames
)
foreach
(
_variableName
${
_variableNames
}
)
message
(
STATUS
"
${
_variableName
}
=
${${
_variableName
}}
"
)
endforeach
()
This diff is collapsed.
Click to expand it.
include/dynamic-graph/CMakeLists.txt
+
2
−
4
View file @
fb5d10a2
...
@@ -48,8 +48,6 @@ SET(${PROJECT_NAME}_HEADERS
...
@@ -48,8 +48,6 @@ SET(${PROJECT_NAME}_HEADERS
all-commands.h
all-commands.h
logger.h
logger.h
)
)
INSTALL
(
FILES
${${
PROJECT_NAME
}
_HEADERS
}
SET
(
PUBLIC_HEADER
${${
PROJECT_NAME
}
_HEADERS
}
)
DESTINATION include/
${
PROJECT_NAME
}
)
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
15
−
3
View file @
fb5d10a2
...
@@ -12,8 +12,8 @@ IF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
...
@@ -12,8 +12,8 @@ IF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ENDIF
(
NOT
(
\"
${
CMAKE_VERBOSITY_LEVEL
}
\" STREQUAL \"\"
))
ENDIF
(
NOT
(
\"
${
CMAKE_VERBOSITY_LEVEL
}
\" STREQUAL \"\"
))
# Declare boost include directories
# Declare boost include directories
include_directories
(
${
Boost_INCLUDE_DIRS
}
)
#
include_directories(${Boost_INCLUDE_DIRS})
link_directories
(
${
Boost_LIBRARY_DIRS
}
)
#
link_directories(${Boost_LIBRARY_DIRS})
ADD_LIBRARY
(
${
LIBRARY_NAME
}
ADD_LIBRARY
(
${
LIBRARY_NAME
}
SHARED
SHARED
...
@@ -40,6 +40,18 @@ ADD_LIBRARY(${LIBRARY_NAME}
...
@@ -40,6 +40,18 @@ ADD_LIBRARY(${LIBRARY_NAME}
command/command.cpp
command/command.cpp
)
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
PUBLIC_HEADER
INCLUDES DESTINATION include/
${
PROJECT_NAME
}
)
target_include_directories
(
${
PROJECT_NAME
}
PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
>
$<INSTALL_INTERFACE:include>
)
SET_TARGET_PROPERTIES
(
${
LIBRARY_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
SET_TARGET_PROPERTIES
(
${
LIBRARY_NAME
}
PROPERTIES SOVERSION
${
PROJECT_VERSION
}
)
...
@@ -48,7 +60,7 @@ IF (UNIX)
...
@@ -48,7 +60,7 @@ IF (UNIX)
ENDIF
(
UNIX
)
ENDIF
(
UNIX
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
LIBRARY_NAME
}
Eigen3::Eigen
)
#IF (UNIX AND NOT APPLE)
#IF (UNIX AND NOT APPLE)
# TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${JRL_MAL_LDFLAGS_OTHER})
# TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${JRL_MAL_LDFLAGS_OTHER})
#ENDIF (UNIX AND NOT APPLE)
#ENDIF (UNIX AND NOT APPLE)
...
...
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
2
−
2
View file @
fb5d10a2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
ADD_DEFINITIONS
(
-DDEBUG=2
)
ADD_DEFINITIONS
(
-DDEBUG=2
)
# Add Boost path to include directories.
# Add Boost path to include directories.
INCLUDE_DIRECTORIES
(
${
Boost_INCLUDE_DIRS
}
)
#
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# Make Boost.Test generates the main function in test cases.
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
...
@@ -64,4 +64,4 @@ DYNAMIC_GRAPH_TEST(debug-logger-winit)
...
@@ -64,4 +64,4 @@ DYNAMIC_GRAPH_TEST(debug-logger-winit)
DYNAMIC_GRAPH_TEST
(
signal-all
)
DYNAMIC_GRAPH_TEST
(
signal-all
)
DYNAMIC_GRAPH_TEST
(
command-test
)
DYNAMIC_GRAPH_TEST
(
command-test
)
DYNAMIC_GRAPH_TEST
(
test-mt
)
DYNAMIC_GRAPH_TEST
(
test-mt
)
TARGET_LINK_LIBRARIES
(
test-mt tracer
)
TARGET_LINK_LIBRARIES
(
test-mt tracer
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment