From 5725835fc3b4acf7de0a7de5b8775a67d150f63e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 9 Sep 2016 17:38:42 +0200 Subject: [PATCH] Fix a bug Do not add non-existent directories to `CGAL_INCLUDE_DIRS`. CMake-3.5.2 complains about that in header-only. --- Installation/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 0f55ee1a1b3..eee53c63bc9 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -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})