Skip to content

Commit

Permalink
Fix BULLET_INCLUDE_DIRS in DART[Core]Config.cmake
Browse files Browse the repository at this point in the history
The fix from #361 doesn't work if bullet package was found by `find_package`. If bullet is not found, `BULLET_INCLUDE_DIRS` will be set to `BULLET_INCLUDE_DIRS-NOT-FOUND` rather than blank as we assumed in #361. Instead, we set DART_INCLUDE_DIRS in the top CMakeList.txt depending on the condition of that bullet has found, and then use it in DART[Core]Config.cmake.in.
  • Loading branch information
jslee02 committed Apr 24, 2016
1 parent 8134697 commit 6ed0aaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,13 @@ endif()

include_directories("${CMAKE_BINARY_DIR}")

set(DART_INCLUDE_DIRS
"${CMAKE_INSTALL_PREFIX}/include"
"${EIGEN3_INCLUDE_DIRS}")
if(HAVE_BULLET_COLLISION)
list(APPEND DART_INCLUDE_DIRS "${BULLET_INCLUDE_DIRS}")
endif()

#===============================================================================
# Link directories
#===============================================================================
Expand Down
5 changes: 1 addition & 4 deletions cmake/DARTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
#===============================================================================
# DART_INCLUDE_DIRS
#===============================================================================
set(DART_INCLUDE_DIRS
"@CMAKE_INSTALL_PREFIX@/include"
"@EIGEN3_INCLUDE_DIRS@"
"@BULLET_INCLUDE_DIRS@")
set(DART_INCLUDE_DIRS "@DART_INCLUDE_DIRS@")

#===============================================================================
# DART_LIBRARY_DIRS
Expand Down
5 changes: 1 addition & 4 deletions cmake/DARTCoreConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
#===============================================================================
# DARTCore_INCLUDE_DIRS
#===============================================================================
set(DARTCore_INCLUDE_DIRS
"@CMAKE_INSTALL_PREFIX@/include"
"@EIGEN3_INCLUDE_DIRS@"
"@BULLET_INCLUDE_DIRS@")
set(DARTCore_INCLUDE_DIRS "@DART_INCLUDE_DIRS@")

#===============================================================================
# DARTCore_LIBRARY_DIRS
Expand Down

0 comments on commit 6ed0aaa

Please sign in to comment.