Skip to content

Commit

Permalink
Update libigl.cmake for the next release of libigl.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdumas committed Feb 10, 2022
1 parent 8bffa8b commit 2e39c20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ project(example)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# Libigl
option(LIBIGL_WITH_OPENGL "Use OpenGL" ON)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" ON)
option(LIBIGL_WITH_GLFW "Build target igl::glfw" ON)
include(libigl)

# Add your project files
file(GLOB SRC_FILES *.cpp)
add_executable(${PROJECT_NAME} ${SRC_FILES})
target_link_libraries(${PROJECT_NAME} PUBLIC igl::core igl::opengl_glfw)
target_link_libraries(${PROJECT_NAME} PUBLIC igl::glfw)
13 changes: 2 additions & 11 deletions cmake/libigl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ include(FetchContent)
FetchContent_Declare(
libigl
GIT_REPOSITORY https://github.com/libigl/libigl.git
GIT_TAG v2.3.0
GIT_TAG b0fd49d59840b5a48e79096462d3198a5c13eee9
)

# Note: In libigl v3.0.0, the following will become a one-liner:
# FetchContent_MakeAvailable(libigl)

FetchContent_GetProperties(libigl)
if(NOT libigl_POPULATED)
FetchContent_Populate(libigl)
endif()
list(PREPEND CMAKE_MODULE_PATH "${libigl_SOURCE_DIR}/cmake")
include(${libigl_SOURCE_DIR}/cmake/libigl.cmake)
FetchContent_MakeAvailable(libigl)

0 comments on commit 2e39c20

Please sign in to comment.