瀏覽代碼

Try to adapt CGAL external project for Windows.

Former-commit-id: ee02dfaa76a822e8c4b741310b04a0b675427733
Jérémie Dumas 7 年之前
父節點
當前提交
5219d786f8
共有 1 個文件被更改,包括 11 次插入12 次删除
  1. 11 12
      shared/cmake/FindCGAL.cmake

+ 11 - 12
shared/cmake/FindCGAL.cmake

@@ -13,27 +13,27 @@
 # Construct consitent error messages for use below.
 # Construct consitent error messages for use below.
 set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
 set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.")
 set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")
 set(CGAL_DIR_MESSAGE     "CGAL not found.  Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}")
- 
+
 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
- 
+
 if ( NOT CGAL_DIR )
 if ( NOT CGAL_DIR )
-  
+
   # Get the system search path as a list.
   # Get the system search path as a list.
   if(UNIX)
   if(UNIX)
     string(REGEX MATCHALL "[^:]+" CGAL_DIR_SEARCH1 "$ENV{PATH}")
     string(REGEX MATCHALL "[^:]+" CGAL_DIR_SEARCH1 "$ENV{PATH}")
   else()
   else()
     string(REGEX REPLACE "\\\\" "/" CGAL_DIR_SEARCH1 "$ENV{PATH}")
     string(REGEX REPLACE "\\\\" "/" CGAL_DIR_SEARCH1 "$ENV{PATH}")
   endif()
   endif()
-  
+
   string(REGEX REPLACE "/;" ";" CGAL_DIR_SEARCH2 "${CGAL_DIR_SEARCH1}")
   string(REGEX REPLACE "/;" ";" CGAL_DIR_SEARCH2 "${CGAL_DIR_SEARCH1}")
 
 
   # Construct a set of paths relative to the system search path.
   # Construct a set of paths relative to the system search path.
   set(CGAL_DIR_SEARCH "")
   set(CGAL_DIR_SEARCH "")
-  
+
   foreach(dir ${CGAL_DIR_SEARCH2})
   foreach(dir ${CGAL_DIR_SEARCH2})
-  
+
     set(CGAL_DIR_SEARCH ${CGAL_DIR_SEARCH} ${dir}/../lib/CGAL )
     set(CGAL_DIR_SEARCH ${CGAL_DIR_SEARCH} ${dir}/../lib/CGAL )
-      
+
   endforeach()
   endforeach()
 
 
 
 
@@ -42,9 +42,9 @@ if ( NOT CGAL_DIR )
   #
   #
   find_path(CGAL_DIR CGALConfig.cmake
   find_path(CGAL_DIR CGALConfig.cmake
     # Look for CGAL in 'external/' folder
     # Look for CGAL in 'external/' folder
-	"${CMAKE_CURRENT_LIST_DIR}/../../external/cgal/cgal/lib/CGAL"
+    "${CMAKE_CURRENT_LIST_DIR}/../../external/cgal/lib/CGAL"
 
 
-    #[=[ Look for an environment variable CGAL_DIR.
+    # Look for an environment variable CGAL_DIR.
     $ENV{CGAL_DIR}
     $ENV{CGAL_DIR}
 
 
     # Look in places relative to the system executable search path.
     # Look in places relative to the system executable search path.
@@ -68,16 +68,15 @@ if ( NOT CGAL_DIR )
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
     [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-	#]=]
 
 
     # Help the user find it if we cannot.
     # Help the user find it if we cannot.
     DOC "The ${CGAL_DIR_DESCRIPTION}"
     DOC "The ${CGAL_DIR_DESCRIPTION}"
   )
   )
-  
+
 endif()
 endif()
 
 
 if ( CGAL_DIR )
 if ( CGAL_DIR )
-  
+
   if ( EXISTS "${CGAL_DIR}/CGALConfig.cmake" )
   if ( EXISTS "${CGAL_DIR}/CGALConfig.cmake" )
     include( "${CGAL_DIR}/CGALConfig.cmake" )
     include( "${CGAL_DIR}/CGALConfig.cmake" )
     set( CGAL_FOUND TRUE )
     set( CGAL_FOUND TRUE )