diff --git a/CGAL_Core/src/CGAL_Core/CMakeLists.txt b/CGAL_Core/src/CGAL_Core/CMakeLists.txt index 02b5103db2e..08b450fb314 100644 --- a/CGAL_Core/src/CGAL_Core/CMakeLists.txt +++ b/CGAL_Core/src/CGAL_Core/CMakeLists.txt @@ -10,7 +10,9 @@ link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) collect_cgal_library(CGAL_Core "") -target_link_libraries( CGAL_Core ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ) +# CGAL_Core does not depend on CGAL in either DEBUG or RELEASE, but we +# still link it. +target_link_libraries( CGAL_Core CGAL ${CGAL_3RD_PARTY_LIBRARIES} ) add_dependencies( CGAL_Core CGAL ) diff --git a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt index c9cce722fec..c424de0db03 100644 --- a/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/src/CGAL_ImageIO/CMakeLists.txt @@ -58,7 +58,9 @@ if(OPENGL_FOUND) add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_ImageIO_3RD_PARTY_DEFINITIONS} ) - target_link_libraries( CGAL_ImageIO ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ) + # CGAL_ImageIO only depends on CGAL in DEBUG, but we still link it + # in both build types. + target_link_libraries( CGAL_ImageIO CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_ImageIO_3RD_PARTY_LIBRARIES} ) message("libCGAL_ImageIO is configured") diff --git a/GraphicsView/src/CGAL_Qt4/CMakeLists.txt b/GraphicsView/src/CGAL_Qt4/CMakeLists.txt index c3ed5233c08..b389d01c610 100644 --- a/GraphicsView/src/CGAL_Qt4/CMakeLists.txt +++ b/GraphicsView/src/CGAL_Qt4/CMakeLists.txt @@ -68,7 +68,9 @@ if( QT4_FOUND ) add_dependencies( CGAL_Qt4 CGAL ) - target_link_libraries( CGAL_Qt4 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt4_3RD_PARTY_LIBRARIES} ) + # CGAL_Qt4 only depends on CGAL in DEBUG, but we still link it in + # both build types. + target_link_libraries( CGAL_Qt4 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt4_3RD_PARTY_LIBRARIES} ) add_definitions ( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt4_3RD_PARTY_DEFINITIONS} ) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 93845505ade..f99b65d7f33 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -763,7 +763,6 @@ endforeach() include_directories (${CGAL_INCLUDE_DIRS}) -cache_get(CGAL_LIBRARY) cache_get(CGAL_3RD_PARTY_PRECONFIGURED ) cache_get(CGAL_3RD_PARTY_DEFINITIONS ) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 38846676fa0..5e0f63a5ada 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -42,10 +42,6 @@ if(NOT USE_CGAL_FILE_INCLUDED) include_directories( "${CMAKE_CURRENT_BINARY_DIR}" ) - # need to get variable from cache while compiling CGAL, while in a demo it is set in CGALConfig.cmake - if ( NOT CGAL_LIBRARY ) - cache_get(CGAL_LIBRARY) - endif() if(TARGET CGAL) add_to_list( CGAL_LIBRARIES CGAL ) else() diff --git a/Qt_widget/src/CGAL_Qt3/CMakeLists.txt b/Qt_widget/src/CGAL_Qt3/CMakeLists.txt index ef24865e3ae..c1267a1ad50 100644 --- a/Qt_widget/src/CGAL_Qt3/CMakeLists.txt +++ b/Qt_widget/src/CGAL_Qt3/CMakeLists.txt @@ -71,7 +71,7 @@ if( QT3_FOUND ) add_dependencies( CGAL_Qt3 CGAL ) - target_link_libraries( CGAL_Qt3 ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt3_3RD_PARTY_LIBRARIES} ) + target_link_libraries( CGAL_Qt3 CGAL ${CGAL_3RD_PARTY_LIBRARIES} ${CGAL_Qt3_3RD_PARTY_LIBRARIES} ) add_definitions( ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt3_3RD_PARTY_DEFINITIONS} )