diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 259fb97b451..449639c97fd 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -60,11 +60,15 @@ if(NOT USE_CGAL_FILE_INCLUDED) if (CGAL_HEADER_ONLY) add_definitions(-DCGAL_HEADER_ONLY) - link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_3RD_PARTY_LIBRARIES} ) + if(NOT CGAL_NO_BLANKET_LINKING) + link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) + link_libraries ( ${CGAL_3RD_PARTY_LIBRARIES} ) + endif() else() - link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + if(NOT CGAL_NO_BLANKET_LINKING) + link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) + link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + endif() endif() endif()