diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index 1632d1bc6d5..42001cc90c8 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -63,7 +63,12 @@ function(create_single_source_cgal_program firstfile ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) - target_link_libraries(${exe_name} PRIVATE CGAL::CGAL ) + target_link_libraries(${exe_name} PRIVATE CGAL::CGAL) + if(CGAL_3RD_PARTY_LIBRARIES) + message(DEPRECATION "Deprecated use of CGAL_3RD_PARTY_LIBRARIES: " ${CGAL_3RD_PARTY_LIBRARIES}) + target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES}) + endif() + else() message(AUTHOR_WARNING "The executable ${exe_name} will not be created because the source file ${firstfile} does not exist.") endif() diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 46e41281295..8dd14c9016e 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -64,7 +64,7 @@ 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} ) + link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) else() link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) link_libraries ( ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )