mirror of https://github.com/CGAL/cgal
Check if the targets already exist
`CGALConfig.cmake` is guarded, but it might be that the targets are already defined by a sub-directory.
This commit is contained in:
parent
97352da979
commit
a27beba41c
|
|
@ -73,9 +73,11 @@ endforeach()
|
|||
# Define the CGAL targets and theirs CGAL:: aliases
|
||||
#
|
||||
foreach(cgal_lib CGAL CGAL_Core CGAL_ImageIO CGAL_Qt5)
|
||||
if(${cgal_lib}_FOUND)
|
||||
if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib})
|
||||
add_library(${cgal_lib} INTERFACE)
|
||||
add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib})
|
||||
if(NOT TARGET CGAL::${cgal_lib})
|
||||
add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue