Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
example-robot-data
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
Gepetto
example-robot-data
Commits
ecd4218c
Commit
ecd4218c
authored
4 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Export
parent
b2e1bfcc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+22
-20
22 additions, 20 deletions
CMakeLists.txt
cmake
+1
-1
1 addition, 1 deletion
cmake
with
23 additions
and
21 deletions
CMakeLists.txt
+
22
−
20
View file @
ecd4218c
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
0
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
1
)
#
Set up p
roject properties
#
P
roject properties
SET
(
PROJECT_
NAMESPACE
gepetto
)
SET
(
PROJECT_
ORG
gepetto
)
SET
(
PROJECT_NAME example-robot-data
)
SET
(
PROJECT_NAME example-robot-data
)
SET
(
PROJECT_DESCRIPTION
"Set of robot URDFs for benchmarking and developed examples."
)
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/base.cmake
)
INCLUDE
(
cmake/test.cmake
)
INCLUDE
(
cmake/python.cmake
)
INCLUDE
(
cmake/python.cmake
)
# Print initial message
# Print initial message
MESSAGE
(
"
${
PROJECT_DESCRIPTION
}
, version
${
PROJECT_VERSION
}
"
)
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
(
"All rights reserved."
)
MESSAGE
(
"Released under the BSD 3-Clause License."
)
MESSAGE
(
"Released under the BSD 3-Clause License."
)
# Set a default build type to 'Release' if none was specified
# Project definition
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
}
)
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
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
)
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
()
FINDPYTHON
()
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
STRING
(
REGEX REPLACE
"-"
"_"
PY_NAME
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
python
)
ADD_SUBDIRECTORY
(
python
)
...
@@ -41,6 +39,10 @@ IF(BUILD_PYTHON_INTERFACE)
...
@@ -41,6 +39,10 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
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
}
)
ADD_SUBDIRECTORY
(
include/
${
CUSTOM_HEADER_DIR
}
)
INSTALL
(
DIRECTORY robots DESTINATION share/
${
PROJECT_NAME
}
)
INSTALL
(
DIRECTORY robots DESTINATION share/
${
PROJECT_NAME
}
)
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
INSTALL
(
FILES package.xml DESTINATION share/
${
PROJECT_NAME
}
)
...
...
This diff is collapsed.
Click to expand it.
cmake
@
ea65d78d
Compare
7eca9ee6
...
ea65d78d
Subproject commit
7eca9ee6c9d1c4ee20eb82272e94f9d11642053a
Subproject commit
ea65d78d2ab708da3ab736122cd19859bf4e46f8
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