diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 549a0dd2b1a..814d4bfbc06 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -53,11 +53,13 @@ if(NOT USE_CGAL_FILE_INCLUDED) include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ) add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ) - link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) - link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - if (CGAL_HEADER_ONLY) add_definitions(-DCGAL_HEADER_ONLY) + link_directories ( ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) + link_libraries ( ${CGAL_3RD_PARTY_LIBRARIES} ) + else() + link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) + link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) endif() endif()