diff --git a/modules/cgal/Setup.cmake b/modules/cgal/Setup.cmake index 1b6b7e80a7..a14e1152ea 100644 --- a/modules/cgal/Setup.cmake +++ b/modules/cgal/Setup.cmake @@ -5,7 +5,9 @@ file(WRITE "${CMAKE_BINARY_DIR}/build_info/CGAL" "ok=True") set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "Don't override flags") # Ignore CGAL_CXX_FLAGS from previous cmake run, if any set( CGAL_CXX_FLAGS "" CACHE INTERNAL "" FORCE) -include(${CGAL_USE_FILE}) +if (DEFINED CGAL_USE_FILE) + include(${CGAL_USE_FILE}) +endif() # Set "standard" include/link variables from CGAL's set(CGAL_INCLUDE_PATH ${CGAL_INCLUDE_DIRS} CACHE INTERNAL "" FORCE) set(CGAL_LINK_PATH ${CGAL_LIBRARIES_DIR} CACHE INTERNAL "" FORCE)