Do not add in link_libraries in header only mode.

This commit is contained in:
Guillaume Damiand 2016-06-01 19:18:43 +02:00
parent 3b6bcc10e4
commit b507b12d4f
1 changed files with 5 additions and 3 deletions

View File

@ -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()