diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 59e846b89d2..ffddd0917c0 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -75,6 +75,13 @@ endif() # keyword. # function(CGAL_setup_CGAL_dependencies target) + foreach(dir ${CGAL_INCLUDE_DIRS}) + target_include_directories(${target} INTERFACE + $) + endforeach() + target_include_directories(${target} INTERFACE + $) + if(CGAL_DISABLE_GMP) target_compile_definitions(${target} INTERFACE CGAL_DISABLE_GMP=1) else() @@ -96,13 +103,6 @@ function(CGAL_setup_CGAL_dependencies target) use_CGAL_Boost_support(${target} INTERFACE) - foreach(dir ${CGAL_INCLUDE_DIRS}) - target_include_directories(${target} INTERFACE - $) - endforeach() - target_include_directories(${target} INTERFACE - $) - # Make CGAL depend on threads-support (for Epeck and Epeck_d) if(CGAL_HAS_NO_THREADS) target_compile_definitions(${target} INTERFACE CGAL_HAS_NO_THREADS)