Jelajahi Sumber

Experimenting with CGAL as an external CMake project.

Former-commit-id: 3c86ad133ce08cf251a90ab8cdf4941d4f19ca33
Jérémie Dumas 7 tahun lalu
induk
melakukan
0bd50a36ca
2 mengubah file dengan 6 tambahan dan 3 penghapusan
  1. 4 1
      shared/cmake/FindCGAL.cmake
  2. 2 2
      tutorial/CMakeLists.txt

+ 4 - 1
shared/cmake/FindCGAL.cmake

@@ -41,8 +41,10 @@ if ( NOT CGAL_DIR )
   # Look for an installation or build tree.
   # Look for an installation or build tree.
   #
   #
   find_path(CGAL_DIR CGALConfig.cmake
   find_path(CGAL_DIR CGALConfig.cmake
+    # Look for CGAL in 'external/' folder
+	"${CMAKE_CURRENT_LIST_DIR}/../../external/cgal/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.
@@ -66,6 +68,7 @@ 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}"

+ 2 - 2
tutorial/CMakeLists.txt

@@ -5,7 +5,7 @@ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}")
 
 
 ### conditionally compile certain modules depending on libraries found on the system
 ### conditionally compile certain modules depending on libraries found on the system
 list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../shared/cmake)
 list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../shared/cmake)
-find_package(CGAL QUIET COMPONENTS Core)
+#find_package(CGAL QUIET COMPONENTS Core)
 find_package(MATLAB QUIET)
 find_package(MATLAB QUIET)
 find_package(MOSEK)
 find_package(MOSEK)
 
 
@@ -16,7 +16,7 @@ option(LIBIGL_WITH_NANOGUI     "Use Nanogui menu"   OFF)
 option(LIBIGL_WITH_EMBREE      "Use Embree"         ON)
 option(LIBIGL_WITH_EMBREE      "Use Embree"         ON)
 
 
 ### libIGL options: choose your dependencies (by default everything is OFF, in this example we need the viewer)
 ### libIGL options: choose your dependencies (by default everything is OFF, in this example we need the viewer)
-option(LIBIGL_WITH_CGAL             "Use CGAL"           "${CGAL_FOUND}")
+option(LIBIGL_WITH_CGAL             "Use CGAL"           ON)
 option(LIBIGL_WITH_CORK             "Use CORK"           OFF)
 option(LIBIGL_WITH_CORK             "Use CORK"           OFF)
 option(LIBIGL_WITH_MATLAB           "Use Matlab"         "${MATLAB_FOUND}")
 option(LIBIGL_WITH_MATLAB           "Use Matlab"         "${MATLAB_FOUND}")
 option(LIBIGL_WITH_MOSEK            "Use MOSEK"          "${MOSEK_FOUND}")
 option(LIBIGL_WITH_MOSEK            "Use MOSEK"          "${MOSEK_FOUND}")