From b507b12d4fb9d70d257bc0e397410d2dd85a51ce Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 1 Jun 2016 19:18:43 +0200 Subject: [PATCH] Do not add in link_libraries in header only mode. --- Installation/cmake/modules/UseCGAL.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()