Explorar el Código

Prevent libigl from overwriting previously existing boost options

Former-commit-id: fe3acb5a0ebdb3f36e8d362e77cae0e3eefb220b
Wesley Ranger hace 7 años
padre
commit
dcd85c672c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      shared/cmake/libigl.cmake

+ 3 - 1
shared/cmake/libigl.cmake

@@ -143,7 +143,9 @@ if(LIBIGL_WITH_CGAL)
       set(Boost_USE_STATIC_LIBS ON) # Favor static Boost libs on Windows
     endif()
     target_include_directories(igl_cgal ${IGL_SCOPE} "${GMP_INCLUDE_DIR}" "${MPFR_INCLUDE_DIR}")
-    find_package(Boost 1.48 REQUIRED thread system)
+    if(NOT (Boost_THREAD_FOUND AND Boost_SYSTEM_FOUND))
+      find_package(Boost 1.48 REQUIRED thread system)
+    endif(NOT (Boost_THREAD_FOUND AND Boost_SYSTEM_FOUND))
     target_include_directories(igl_cgal ${IGL_SCOPE} ${CGAL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
     target_link_libraries(igl_cgal ${IGL_SCOPE} CGAL::CGAL CGAL::CGAL_Core ${Boost_LIBRARIES})
   else()