Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gepetto-viewer-corba
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
gepetto-viewer-corba
Commits
7b61b226
Commit
7b61b226
authored
1 year ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
CMake: allow use of installed JRL-cmakemodules
parent
929d5a27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#37515
failed
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+34
-3
34 additions, 3 deletions
CMakeLists.txt
with
34 additions
and
3 deletions
CMakeLists.txt
+
34
−
3
View file @
7b61b226
...
...
@@ -24,9 +24,40 @@ set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE)
set
(
CXX_DISABLE_WERROR true
)
set
(
DOXYGEN_USE_TEMPLATE_CSS TRUE
)
include
(
cmake/base.cmake
)
include
(
cmake/idl.cmake
)
include
(
cmake/apple.cmake
)
# Check if the submodule cmake have been initialized
set
(
JRL_CMAKE_MODULES
"
${
CMAKE_CURRENT_LIST_DIR
}
/cmake"
)
if
(
EXISTS
"
${
JRL_CMAKE_MODULES
}
/base.cmake"
)
message
(
STATUS
"JRL cmakemodules found in 'cmake/' git submodule"
)
else
()
find_package
(
jrl-cmakemodules QUIET CONFIG
)
if
(
jrl-cmakemodules_FOUND
)
get_property
(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)
message
(
STATUS
"JRL cmakemodules found on system at
${
JRL_CMAKE_MODULES
}
"
)
elseif
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.14.0"
)
message
(
FATAL_ERROR
"
\n
Can't find jrl-cmakemodules. Please either:
\n
"
" - use git submodule: 'git submodule update --init'
\n
"
" - or install https://github.com/jrl-umi3218/jrl-cmakemodules
\n
"
" - or upgrade your CMake version to >= 3.14 to allow automatic fetching
\n
"
)
else
()
message
(
STATUS
"JRL cmakemodules not found. Let's fetch it."
)
include
(
FetchContent
)
FetchContent_Declare
(
"jrl-cmakemodules"
GIT_REPOSITORY
"https://github.com/jrl-umi3218/jrl-cmakemodules.git"
)
FetchContent_MakeAvailable
(
"jrl-cmakemodules"
)
FetchContent_GetProperties
(
"jrl-cmakemodules"
SOURCE_DIR JRL_CMAKE_MODULES
)
endif
()
endif
()
include
(
"
${
JRL_CMAKE_MODULES
}
/base.cmake"
)
include
(
"
${
JRL_CMAKE_MODULES
}
/idl.cmake"
)
include
(
"
${
JRL_CMAKE_MODULES
}
/apple.cmake"
)
set
(
CLIENT_ONLY
FALSE
...
...
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