changeset 2469:9441184a60a0

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Jan 2018 13:22:14 +0100
parents 372678030ada
children 45de30d4f362
files Resources/CMake/BoostConfiguration.cmake
diffstat 1 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/BoostConfiguration.cmake	Tue Jan 16 12:49:04 2018 +0100
+++ b/Resources/CMake/BoostConfiguration.cmake	Tue Jan 16 13:22:14 2018 +0100
@@ -12,20 +12,21 @@
   endif()
 
   list(APPEND ORTHANC_BOOST_COMPONENTS filesystem thread system date_time regex)
-  foreach (item ${ORTHANC_BOOST_COMPONENTS})
-    find_package(Boost QUIET COMPONENTS "${item}")
-    string(TOUPPER ${item} tmp)
-
-    if (Boost_${tmp}_FOUND)
-      set(tmp2 "found")
-    else()
-      set(tmp2 "missing")
-    endif()
-
-    message("Looking for Boost component: ${item} - ${tmp2}")
-  endforeach()
+  find_package(Boost COMPONENTS "${ORTHANC_BOOST_COMPONENTS}")
 
   if (NOT Boost_FOUND)
+    foreach (item ${ORTHANC_BOOST_COMPONENTS})
+      string(TOUPPER ${item} tmp)
+
+      if (Boost_${tmp}_FOUND)
+        set(tmp2 "found")
+      else()
+        set(tmp2 "missing")
+      endif()
+      
+      message("Boost component ${item} - ${tmp2}")
+    endforeach()
+    
     message(FATAL_ERROR "Unable to locate Boost on this system")
   endif()