Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Jan 26, 2020
1 parent 97d5d89 commit 142826b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if(NOT IDYNTREE_ONLY_DOCS)
# add the actual components of the library
add_subdirectory(src)

# List exported dependencies
# List exported CMake package dependencies
set(_IDYNTREE_EXPORTED_DEPENDENCIES "")
if(IDYNTREE_USES_YARP)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES YARP)
Expand All @@ -68,14 +68,22 @@ if(NOT IDYNTREE_ONLY_DOCS)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES orocos_kdl)
endif()

# List exported CMake package dependencies when the library is compiled as static
set(_IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC "")
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC LibXml2)
if(IDYNTREE_USES_OSQPEIGEN)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC OsqpEigen)
endif()

include(InstallBasicPackageFiles)
install_basic_package_files(iDynTree VARS_PREFIX ${VARS_PREFIX}
VERSION ${${VARS_PREFIX}_VERSION}
COMPATIBILITY AnyNewerVersion
TARGETS_PROPERTY ${VARS_PREFIX}_TARGETS
NO_CHECK_REQUIRED_COMPONENTS_MACRO
ENABLE_COMPATIBILITY_VARS
DEPENDENCIES ${_IDYNTREE_EXPORTED_DEPENDENCIES})
DEPENDENCIES ${_IDYNTREE_EXPORTED_DEPENDENCIES}
PRIVATE_DEPENDENCIES ${_IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC})

include(AddUninstallTarget)

Expand Down
4 changes: 2 additions & 2 deletions cmake/iDynTreeDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if (IDYNTREE_USES_ICUB)
endif ()

idyntree_handle_dependency(IPOPT)
idyntree_handle_dependency(Irrlicht)
idyntree_handle_dependency(Irrlicht DO_NOT_SILENTLY_SEARCH)
idyntree_handle_dependency(Qt5 COMPONENTS Qml Quick Widgets)
idyntree_handle_dependency(OsqpEigen MAIN_TARGET OsqpEigen::OsqpEigen)
idyntree_handle_dependency(ALGLIB DO_NOT_SILENTLY_SEARCH)
Expand All @@ -96,6 +96,6 @@ if(IDYNTREE_USES_ALGLIB AND ALGLIB_FOUND)
message(FATAL_ERROR "Exactly ALGLIB version ${ALGLIB_REQUIRED_VERSION} is required, but ${ALGLIB_VERSION} is available.")
endif()
endif()
idyntree_handle_dependency(WORHP)
idyntree_handle_dependency(WORHP DO_NOT_SILENTLY_SEARCH)
# Workaround for https://github.com/robotology/idyntree/issues/599
idyntree_handle_dependency(ASSIMP DO_NOT_SILENTLY_SEARCH MAIN_TARGET assimp::assimp)

0 comments on commit 142826b

Please sign in to comment.