fix: rename deps/Cmakelists.txt → CMakeLists.txt (case-sensitive Linux fix)
Some checks failed
C++ Tests / test (push) Has started running
Mirror to Codeberg / mirror (push) Has been cancelled

macOS filesystem is case-insensitive so both spellings worked locally,
but the Linux container (CI) could not find the file and failed with
"does not contain a CMakeLists.txt file".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tarik Moussa
2026-05-10 00:22:16 +02:00
parent 42dd815591
commit 6a70309a30

56
code/deps/CMakeLists.txt Normal file
View File

@@ -0,0 +1,56 @@
# deps/CMakeLists.txt
#
# Lazy tarball extraction a dependency is only extracted when its directory
# does not yet exist. Extraction happens at cmake configure time.
#
# Which deps are extracted depends on the active build mode:
#
# (default) Eigen only → tests-only build
# WITH_VIEWER=ON + Eigen, libigl, libigl-glad, glfw
# WITH_CGAL=ON + Eigen, CGAL (WITH_VIEWER is implied by WITH_CGAL)
#
function(setup_dependency NAME SUBDIR)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${NAME}")
file(MAKE_DIRECTORY "${NAME}")
file(GLOB TARBALL "${CMAKE_CURRENT_SOURCE_DIR}/tarballs/${NAME}.tar.*")
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}")
if(NOT TARBALL)
message(FATAL_ERROR "❌ No '${NAME}*.tar.*' in deps/tarballs/")
else()
message(STATUS "${CMAKE_COMMAND} ${TARBALL}")
if(SUBDIR STREQUAL "")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E tar xf "${TARBALL}"
RESULT_VARIABLE TAR_STATUS
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
else()
execute_process(
COMMAND "${CMAKE_COMMAND}" -E tar xf "${TARBALL}" "${NAME}/${SUBDIR}"
RESULT_VARIABLE TAR_STATUS
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
message(STATUS "Extracting ${NAME}... Status: ${TAR_STATUS}")
if(NOT TAR_STATUS EQUAL 0)
message(FATAL_ERROR "❌ Extract failed: ${NAME}")
endif()
endif()
else()
message(STATUS "✅ ${NAME} already exists, skipping extraction.")
endif()
endfunction()
# ── Always required ────────────────────────────────────────────────────────────
setup_dependency("eigen-3.4.0" "Eigen")
# ── Viewer mode ────────────────────────────────────────────────────────────────
if(WITH_VIEWER)
setup_dependency("libigl-2.6.0" "include")
setup_dependency("libigl-glad" "")
setup_dependency("glfw-3.4" "")
endif()
# ── CGAL mode ─────────────────────────────────────────────────────────────────
if(WITH_CGAL)
setup_dependency("CGAL-6.1.1" "include")
endif()