Merge pull request #1309 from lrineau/CGAL-fix_HEADER_ONLY-lrineau

Hack to fix a bug with CGAL_HEADER_ONLY
This commit is contained in:
Laurent Rineau 2016-07-28 16:44:58 +02:00
commit 1c16ae9a52
1 changed files with 16 additions and 11 deletions

View File

@ -56,6 +56,11 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES)
SOVERSION "${CGAL_SONAME_VERSION}")
endif()
else()
if(${LIBRARY_NAME}_LIB_DEPENDS)
# Fix a bug when CGAL is configured first without `CGAL_HEADER_ONLY`
# and then `CGAL_HEADER_ONLY` is set without cleaning the cache.
unset(${LIBRARY_NAME}_LIB_DEPENDS CACHE)
endif()
add_library(${LIBRARY_NAME} INTERFACE)
endif()