Skip to content

Commit 3204328

Browse files
committed
Remove unrecheable version check for the case of failure of finding package
1 parent c7c03b9 commit 3204328

File tree

1 file changed

+9
-45
lines changed

1 file changed

+9
-45
lines changed

CMakeLists.txt

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -125,23 +125,15 @@ find_package(EIGEN3 3.0.5 QUIET)
125125
if(EIGEN3_FOUND)
126126
message(STATUS "Looking for EIGEN3 - ${EIGEN3_VERSION} found")
127127
else()
128-
if(PC_EIGEN3_VERSION)
129-
message(SEND_ERROR "Looking for EIGEN3 - ${EIGEN3_VERSION} found, ${PROJECT_NAME} requires 3.0.5 or greater.")
130-
else()
131-
message(SEND_ERROR "Looking for EIGEN3 - NOT found, please install libeigen3-dev")
132-
endif()
128+
message(SEND_ERROR "Looking for EIGEN3 - NOT found, please install libeigen3-dev (>= 3.0.5)")
133129
endif()
134130

135131
# CCD
136132
find_package(CCD 1.4.0 QUIET)
137133
if(CCD_FOUND)
138134
message(STATUS "Looking for CCD - ${CCD_VERSION} found")
139135
else()
140-
if(CCD_VERSION)
141-
message(SEND_ERROR "Looking for CCD - ${CCD_VERSION} found, ${PROJECT_NAME} requires 1.4.0 or greater.")
142-
else()
143-
message(SEND_ERROR "Looking for CCD - NOT found, please install libccd-dev")
144-
endif()
136+
message(SEND_ERROR "Looking for CCD - NOT found, please install libccd-dev (>= 1.4.0)")
145137
endif()
146138

147139
# FCL
@@ -164,11 +156,7 @@ if(FCL_FOUND)
164156
endif()
165157
endif()
166158
else()
167-
if(FCL_VERSION)
168-
message(SEND_ERROR "Looking for FCL - ${FCL_VERSION} found, ${PROJECT_NAME} requires 0.2.9 or greater.")
169-
else()
170-
message(SEND_ERROR "Looking for FCL - NOT found, please install libfcl-dev")
171-
endif()
159+
message(SEND_ERROR "Looking for FCL - NOT found, please install libfcl-dev (>= 0.2.9)")
172160
endif()
173161

174162
# ASSIMP
@@ -225,11 +213,7 @@ if(ASSIMP_FOUND)
225213
unset(CMAKE_REQUIRED_LIBRARIES)
226214

227215
else()
228-
if(ASSIMP_VERSION)
229-
message(SEND_ERROR "Looking for ASSIMP - ${ASSIMP_VERSION} found, ${PROJECT_NAME} requires 3.0.0 or greater.")
230-
else()
231-
message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev")
232-
endif()
216+
message(SEND_ERROR "Looking for ASSIMP - NOT found, please install libassimp-dev (>= 3.0.0)")
233217
endif()
234218

235219
# OpenGL
@@ -276,35 +260,23 @@ if(NOT BUILD_CORE_ONLY)
276260
if(FLANN_FOUND)
277261
message(STATUS "Looking for FLANN - ${FLANN_VERSION} found")
278262
else()
279-
if(FLANN_VERSION)
280-
message(SEND_ERROR "Looking for FLANN - ${FLANN_VERSION} found, ${PROJECT_NAME} requires 1.8.4 or greater.")
281-
else()
282-
message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev")
283-
endif()
263+
message(SEND_ERROR "Looking for FLANN - NOT found, please install libflann-dev (>= 1.8.4)")
284264
endif()
285265

286266
# TINYXML
287267
find_package(TINYXML 2.6.2 QUIET)
288268
if(TINYXML_FOUND)
289269
message(STATUS "Looking for TINYXML - ${TINYXML_VERSION} found")
290270
else()
291-
if(TINYXML_VERSION)
292-
message(SEND_ERROR "Looking for TINYXML - ${TINYXML_VERSION} found, ${PROJECT_NAME} requires 2.6.2 or greater.")
293-
else()
294-
message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev")
295-
endif()
271+
message(SEND_ERROR "Looking for TINYXML - NOT found, please install libtinyxml-dev (>= 2.6.2)")
296272
endif()
297273

298274
# TINYXML2
299275
find_package(TINYXML2 QUIET)
300276
if(TINYXML2_FOUND)
301277
message(STATUS "Looking for TINYXML2 - ${TINYXML2_VERSION} found")
302278
else()
303-
if(TINYXML2_VERSION)
304-
message(SEND_ERROR "Looking for TINYXML2 - ${TINYXML2_VERSION} found, ${PROJECT_NAME} requires 1.0.1 or greater.")
305-
else()
306-
message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev")
307-
endif()
279+
message(SEND_ERROR "Looking for TINYXML2 - NOT found, please install libtinyxml2-dev (>= 1.0.1)")
308280
endif()
309281

310282
# urdfdom
@@ -347,11 +319,7 @@ if(NLOPT_FOUND)
347319
message(STATUS "Looking for NLOPT - ${NLOPT_VERSION} found")
348320
set(HAVE_NLOPT TRUE)
349321
else()
350-
if(NLOPT_VERSION)
351-
message(STATUS "Looking for NLOPT - ${NLOPT_VERSION} found, ${PROJECT_NAME} requires 2.4.1 or greater.")
352-
else()
353-
message(STATUS "Looking for NLOPT - NOT found, please install libnlopt-dev")
354-
endif()
322+
message(STATUS "Looking for NLOPT - NOT found, please install libnlopt-dev (>= 2.4.1)")
355323
set(HAVE_NLOPT FALSE)
356324
endif()
357325

@@ -361,11 +329,7 @@ if(IPOPT_FOUND)
361329
message(STATUS "Looking for IPOPT - ${IPOPT_VERSION} found")
362330
set(HAVE_IPOPT TRUE)
363331
else()
364-
if(IPOPT_VERSION)
365-
message(STATUS "Looking for IPOPT - ${IPOPT_VERSION} found, ${PROJECT_NAME} requires 3.11.4 or greater.")
366-
else()
367-
message(STATUS "Looking for IPOPT - NOT found, please install coinor-libipopt-dev")
368-
endif()
332+
message(STATUS "Looking for IPOPT - NOT found, please install coinor-libipopt-dev (>= 3.11.4)")
369333
set(HAVE_IPOPT FALSE)
370334
endif()
371335

0 commit comments

Comments
 (0)