Skip to content

Commit

Permalink
Fix drake-config.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Feb 24, 2017
1 parent 62ad739 commit d583334
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ option(FIND_PACKAGE_STRICT
ON)
mark_as_advanced(FIND_PACKAGE_STRICT)

set(DRAKE_DEPENDENCIES)

#------------------------------------------------------------------------------
# Find and load settings from an external project. <PACKAGE>_FOUND will be set
# to indicate whether the package was found.
Expand Down Expand Up @@ -62,6 +64,10 @@ macro(drake_find_package PACKAGE)
"WITH_${dfp_package_upper} is enabled, but could NOT find ${PACKAGE}")
endif()

if(NOT DFP_PKG_CONFIG AND ${PACKAGE}_FOUND)
list(APPEND DRAKE_DEPENDENCIES ${PACKAGE})
endif()

unset(dfp_package_upper)
unset(dfp_quiet)
unset(dfp_required)
Expand Down
8 changes: 8 additions & 0 deletions drake/drake-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ set(DRAKE_VERSION "@PROJECT_VERSION@")
set_and_check(DRAKE_INCLUDE_DIRS "@PACKAGE_DRAKE_INCLUDE_DIR@")
set_and_check(DRAKE_LIBRARY_DIRS "@PACKAGE_DRAKE_LIBRARY_DIR@")

set(DRAKE_DEPENDENCIES "@DRAKE_DEPENDENCIES@")

include(CMakeFindDependencyMacro)

foreach(_DEPENDENCY ${DRAKE_DEPENDENCIES})
find_dependency(${_DEPENDENCY})
endforeach()

include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")

0 comments on commit d583334

Please sign in to comment.