Replace CGAL_LIBRARY with the actual CGAL target

The variable CGAL_LIBRARY is no longer defined within the build as it is
completely unnecessary and using the actual target allows more features.
This commit is contained in:
Philipp Möller 2015-07-03 12:21:30 +02:00
parent ba9cf09f03
commit 33a1fdbcbc
6 changed files with 10 additions and 9 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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