Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
example-robot-data
Commits
ecd4218c
Commit
ecd4218c
authored
Apr 01, 2020
by
Guilhem Saurel
Browse files
[CMake] Export
parent
b2e1bfcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
ecd4218c
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
0
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
1
)
#
Set up p
roject properties
SET
(
PROJECT_
NAMESPACE
gepetto
)
#
P
roject properties
SET
(
PROJECT_
ORG
gepetto
)
SET
(
PROJECT_NAME example-robot-data
)
SET
(
PROJECT_DESCRIPTION
"Set of robot URDFs for benchmarking and developed examples."
)
SET
(
PROJECT_URL https://gepgitlab.laas.fr/
${
PROJECT_
NAMESPACE
}
/
${
PROJECT_NAME
}
)
SET
(
PROJECT_URL https://gepgitlab.laas.fr/
${
PROJECT_
ORG
}
/
${
PROJECT_NAME
}
)
# Project options
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python unit tests and helpers"
ON
)
OPTION
(
INSTALL_PYTHON_INTERFACE_ONLY
"Install *ONLY* the python interface"
OFF
)
# Project configuration
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
ENDIF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
SET
(
CUSTOM_HEADER_DIR
${
PROJECT_NAME
}
)
# JRL-cmakemodule setup
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/test.cmake
)
INCLUDE
(
cmake/python.cmake
)
# Print initial message
MESSAGE
(
"
${
PROJECT_DESCRIPTION
}
, version
${
PROJECT_VERSION
}
"
)
MESSAGE
(
"Copyright (C) 2018-2020
CNRS-LAA
S / University of Edinburgh"
)
MESSAGE
(
"Copyright (C) 2018-2020
LAAS-CNR
S / University of Edinburgh"
)
MESSAGE
(
"All rights reserved."
)
MESSAGE
(
"Released under the BSD 3-Clause License."
)
# Set a default build type to 'Release' if none was specified
IF
(
NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES
)
MESSAGE
(
STATUS
"Setting build type to 'Release' as none was specified."
)
SET
(
CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build."
FORCE
)
# Set the possible values of build type for cmake-gui
SET_PROPERTY
(
CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug"
"Release"
"MinSizeRel"
"RelWithDebInfo"
)
ENDIF
()
SET
(
CUSTOM_HEADER_DIR
${
PROJECT_NAME
}
)
# Project definition
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
OPTION
(
BUILD_PYTHON_INTERFACE
"Build the python unit tests and helpers"
ON
)
OPTION
(
INSTALL_PYTHON_INTERFACE_ONLY
"Install *ONLY* the python interface"
OFF
)
IF
(
BUILD_PYTHON_INTERFACE
)
ADD_
REQUIRED
_DEPENDENCY
(
"pinocchio >= 2.1.0"
)
ADD_
PROJECT
_DEPENDENCY
(
pinocchio 2.1.0 REQUIRED PKG_CONFIG_REQUIRES
"pinocchio >= 2.1.0"
)
FINDPYTHON
()
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
python
)
...
...
@@ -41,6 +39,10 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
ADD_LIBRARY
(
${
PROJECT_NAME
}
INTERFACE
)
TARGET_INCLUDE_DIRECTORIES
(
${
PROJECT_NAME
}
INTERFACE $<INSTALL_INTERFACE:include>
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION lib
)
ADD_SUBDIRECTORY
(
include/
${
CUSTOM_HEADER_DIR
}
)
INSTALL
(
DIRECTORY robots DESTINATION share/
${
PROJECT_NAME
}
)
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
...
...
cmake
@
ea65d78d
Compare
7eca9ee6
...
ea65d78d
Subproject commit
7eca9ee6c9d1c4ee20eb82272e94f9d11642053a
Subproject commit
ea65d78d2ab708da3ab736122cd19859bf4e46f8
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment