Skip to content

Commit

Permalink
Move libigl options to a dedicated cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-laurin committed May 5, 2023
1 parent 497f12c commit 30022d0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ if(NOT Eigen3_FOUND)
vtk_module_find_package(PACKAGE Eigen3 VERSION 3.3 CONFIG_MODE PRIVATE)
endif()

vtk_module_find_package(PACKAGE CGAL VERSION 5.1.1 CONFIG_MODE PRIVATE)

if(NOT DEFINED LIBIGL_DIR)
message(FATAL_ERROR "The CMake variable LIBIGL_DIR is undefined.")
endif()

if(${LIBIGL_DIR} STREQUAL "")
message(FATAL_ERROR "Path to LIBIGL_DIR is empty")
message(FATAL_ERROR "The CMake variable LIBIGL_DIR is an empty string.")
endif()

vtk_module_find_package(PACKAGE CGAL VERSION 5.1.1 CONFIG_MODE PRIVATE)
if(NOT TARGET igl::core)
include(LibiglOptions)
add_subdirectory(${LIBIGL_DIR} ${CMAKE_BINARY_DIR}/bin/libigl)
endif()

# Namespace adaptive to how the module is built (as a pure module or as plugins)
SET(NAMESPACE "")
Expand Down

0 comments on commit 30022d0

Please sign in to comment.