-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* packaging: update test * packaging: test pkgconfig * ci: fix path * ci: fix test * cmake: fix path * cmake: fix typo * cmake: export variables * test/packaging: add test for FetchContent * cmake: sync submodule * ci: run external cmake example * ci: fix * ci: fix GIT_TAG * ci: fix branch name * ci: fix branch name extraction * ci: fix git url
- Loading branch information
Showing
6 changed files
with
115 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
cmake_minimum_required(VERSION 3.11) | ||
|
||
project(ExtraLib CXX) | ||
|
||
message(STATUS "PINOCCHIO_GIT_REPOSITORY: $ENV{PINOCCHIO_GIT_REPOSITORY}") | ||
message(STATUS "PINOCCHIO_GIT_TAG: $ENV{PINOCCHIO_GIT_TAG}") | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
#FetchContent_Populate( | ||
Pinocchio | ||
GIT_REPOSITORY $ENV{PINOCCHIO_GIT_REPOSITORY} | ||
GIT_TAG $ENV{PINOCCHIO_GIT_TAG} | ||
GIT_SUBMODULES cmake | ||
GIT_SHALLOW ON | ||
) | ||
|
||
FetchContent_GetProperties(Pinocchio) | ||
if(NOT pinocchio_POPULATED) # name is lowercased | ||
FetchContent_Populate(Pinocchio) | ||
message(STATUS "pinocchio source dir: ${pinocchio_SOURCE_DIR}") | ||
message(STATUS "pinocchio binary dir: ${pinocchio_BINARY_DIR}") | ||
set(BUILD_PYTHON_INTERFACE OFF CACHE INTERNAL "Build Python bindings") | ||
set(BUILD_TESTING OFF CACHE INTERNAL "Build unit tests") | ||
add_subdirectory(${pinocchio_SOURCE_DIR} ${pinocchio_BINARY_DIR}) # name is lowercased | ||
endif() | ||
# or simply FetchContent_MakeAvailable(Pinocchio) | ||
|
||
set(PINOCCHIO_MODEL_DIR "${PROJECT_SOURCE_DIR}/../../../models") | ||
add_definitions('-DPINOCCHIO_MODEL_DIR=\"${PINOCCHIO_MODEL_DIR}\"') | ||
|
||
add_executable(run_rnea ../run_rnea.cpp) | ||
target_link_libraries(run_rnea PUBLIC pinocchio) | ||
|
||
if(DEFINED PINOCCHIO_USE_URDFDOM) | ||
add_executable(load_urdf ../load_urdf.cpp) | ||
target_link_libraries(load_urdf PUBLIC pinocchio) | ||
endif(DEFINED PINOCCHIO_USE_URDFDOM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
|
||
project(ExtraLib CXX) | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(PINOCCHIO REQUIRED pinocchio) | ||
|
||
include_directories(SYSTEM ${PINOCCHIO_INCLUDE_DIRS}) | ||
add_executable(run_rnea ../run_rnea.cpp) | ||
target_link_libraries(run_rnea PUBLIC ${PINOCCHIO_LDFLAGS}) | ||
message(STATUS "${PINOCCHIO_LDFLAGS}") |