diff --git a/CMakeLists.txt b/CMakeLists.txt index efba98489..d510d5740 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake index 834f06e03..559fa8f90 100644 --- a/cmake/libigl.cmake +++ b/cmake/libigl.cmake @@ -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)