Add a backward compatibility

A few CMakeLists.txt modify `CGAL_3RD_PARTY_LIBRARIES` to add Boost or
TBB libraries to it. In this case, emit a `DEPRECATION` warning and do
link with `${CGAL_3RD_PARTY_LIBRARIES}`.
This commit is contained in:
Laurent Rineau 2016-09-15 15:48:52 +02:00
parent 20dbf716ba
commit 7c97443e37
2 changed files with 7 additions and 2 deletions

View File

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

View File

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