Fix a bug

Do not add non-existent directories to `CGAL_INCLUDE_DIRS`.

CMake-3.5.2 complains about that in header-only.
This commit is contained in:
Laurent Rineau 2016-09-09 17:38:42 +02:00
parent 98890c9924
commit 5725835fc3
1 changed files with 3 additions and 1 deletions

View File

@ -794,7 +794,9 @@ set(CGAL_LIBRARIES_DIR ${CMAKE_BINARY_DIR}/lib)
set(CGAL_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
foreach (package ${CGAL_CONFIGURED_PACKAGES})
set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include)
if(EXISTS ${package}/include)
set(CGAL_INCLUDE_DIRS ${CGAL_INCLUDE_DIRS} ${package}/include)
endif()
endforeach()
include_directories (${CGAL_INCLUDE_DIRS})