Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify mode for find_package() #1228

Merged
merged 4 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

* Build system

* Fix #1223 for the recursive case: [#1227](https://github.com/dartsim/dart/pull/1227)
* Fixed #1223 for the recursive case: [#1227](https://github.com/dartsim/dart/pull/1227)
* Specified mode for find_package(): [#1228](https://github.com/dartsim/dart/pull/1228)

### [DART 6.7.1 (2019-01-15)](https://github.com/dartsim/dart/milestone/49?closed=1)

Expand Down
6 changes: 3 additions & 3 deletions cmake/DARTFindEigen3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# We intentionally don't specify the required Eigen3 version like
# find_package(Eigen3 3.2.92) because the version file is not provided by
# upstream until 3.3.1.
find_package(Eigen3 REQUIRED)
find_package(Eigen3 REQUIRED CONFIG)
if(EIGEN3_VERSION_STRING VERSION_LESS 3.2.92) # 3.3~beta1
message(FATAL_ERROR "Eigen3 ${EIGEN3_VERSION_STRING} is found but >= 3.2.92
(3.3~beta1) is required"
message(FATAL_ERROR "Eigen3 ${EIGEN3_VERSION_STRING} is found but >= 3.2.92 "
"(3.3~beta1) is required"
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindGLUT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#
# This file is provided under the "BSD-style" License

find_package(GLUT QUIET)
find_package(GLUT QUIET MODULE)
2 changes: 1 addition & 1 deletion cmake/DARTFindIPOPT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(IPOPT 3.11.9 QUIET)
find_package(IPOPT 3.11.9 QUIET MODULE)

if(IPOPT_FOUND AND NOT TARGET IPOPT::ipopt)
add_library(IPOPT::ipopt INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindNLOPT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(NLOPT 2.4.1 QUIET)
find_package(NLOPT 2.4.1 QUIET MODULE)

if(NLOPT_FOUND AND NOT TARGET NLOPT::nlopt)
add_library(NLOPT::nlopt INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(ODE 0.13 QUIET)
find_package(ODE 0.13 QUIET MODULE)

if(ODE_FOUND AND NOT TARGET ODE::ODE)
add_library(ODE::ODE INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindOpenGL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(POLICY CMP0072)
cmake_policy(SET CMP0072 OLD)
endif()

find_package(OpenGL QUIET)
find_package(OpenGL QUIET MODULE)

cmake_policy(POP)

Expand Down
6 changes: 3 additions & 3 deletions cmake/DARTFindassimp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#
# This file is provided under the "BSD-style" License

find_package(assimp REQUIRED)
find_package(assimp REQUIRED MODULE)

# Manually check version because the upstream version compatibility policy
# doesn't allow different major number while DART is compatible any version
# greater than or equal to 3.2.
if(ASSIMP_VERSION VERSION_LESS 3.2)
message(STATUS "Found Assimp ${ASSIMP_VERSION}, but Assimp >= 3.2 is
required"
message(STATUS "Found Assimp ${ASSIMP_VERSION}, but Assimp >= 3.2 is "
"required"
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindccd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(ccd 2.0 REQUIRED)
find_package(ccd 2.0 REQUIRED MODULE)

# Set target ccd if not set
# Upstream provides the target since 2.1
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindfcl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(fcl 0.3.2 REQUIRED)
find_package(fcl 0.3.2 REQUIRED MODULE)

# Set target fcl if not set
# Upstream provides the target since 0.5.0 but some package managers don't
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindflann.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(flann 1.8.4 QUIET)
find_package(flann 1.8.4 QUIET MODULE)

if((FLANN_FOUND OR flann_FOUND) AND NOT TARGET flann)
add_library(flann INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindoctomap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(octomap 1.6.8 QUIET)
find_package(octomap 1.6.8 QUIET CONFIG)

if(octomap_FOUND AND NOT TARGET octomap)
add_library(octomap INTERFACE IMPORTED)
Expand Down
2 changes: 1 addition & 1 deletion cmake/DARTFindpagmo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#
# This file is provided under the "BSD-style" License

find_package(pagmo QUIET)
find_package(pagmo QUIET CONFIG)
2 changes: 1 addition & 1 deletion cmake/DARTFindtinyxml2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(tinyxml2 QUIET)
find_package(tinyxml2 QUIET MODULE)

if((TINYXML2_FOUND OR tinyxml2_FOUND) AND NOT TARGET tinyxml2::tinyxml2)
add_library(tinyxml2::tinyxml2 INTERFACE IMPORTED)
Expand Down
3 changes: 1 addition & 2 deletions cmake/DARTFindurdfdom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# This file is provided under the "BSD-style" License

find_package(urdfdom QUIET)
find_package(urdfdom QUIET CONFIG)

if(urdfdom_FOUND AND NOT TARGET urdfdom)
add_library(urdfdom INTERFACE IMPORTED)
Expand All @@ -15,4 +15,3 @@ if(urdfdom_FOUND AND NOT TARGET urdfdom)
INTERFACE_LINK_LIBRARIES "${urdfdom_LIBRARIES}"
)
endif()