diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/test_ports/vcpkg-ci-libigl | |
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-libigl')
4 files changed, 166 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libigl/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/portfile.cmake new file mode 100644 index 0000000..cf5bbb5 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/portfile.cmake @@ -0,0 +1,17 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libigl/libigl + REF v2.6.0 + SHA512 7c6ae5b94020a01df5d6d0a358592293595d8d8bf04bf42e6acc09bcd6ed012071069373a71ed6f24ce878aa79447dd189b42bc8a3a70819ef05dccc60a2cf68 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DSOURCE_PATH=${SOURCE_PATH}" + "-DFEATURES=${FEATURES}" +) +vcpkg_cmake_build() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/CMakeLists.txt new file mode 100644 index 0000000..e3b1851 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.16) +project(libigl-test C CXX) + +set(CMAKE_CXX_STANDARD 11) + +add_definitions("-DTUTORIAL_SHARED_PATH=\"${SOURCE_PATH}/placeholder\"") + +find_package(libigl CONFIG REQUIRED) + +# Other than in the upstream build ("${SOURCE_PATH}/tutorial/CMakeLists.txt"), +# the imported targets use a different prefix, e.g. +# igl::glfw -> igl::igl_glfw +# igl_copyleft::cgal -> igl_copyleft::igl_copyleft_cgal + +add_executable(101_FileIO "${SOURCE_PATH}/tutorial/101_FileIO/main.cpp") +target_link_libraries(101_FileIO PRIVATE igl::igl_core) + +if("cgal" IN_LIST FEATURES) + add_executable(609_Boolean "${SOURCE_PATH}/tutorial/609_Boolean/main.cpp") + target_link_libraries(609_Boolean PRIVATE igl::igl_glfw igl_copyleft::igl_copyleft_cgal) +endif() + +if("embree" IN_LIST FEATURES) + add_executable(706_FacetOrientation "${SOURCE_PATH}/tutorial/706_FacetOrientation/main.cpp") + target_link_libraries(706_FacetOrientation PRIVATE igl::igl_glfw igl::igl_embree) +endif() + +if("glfw" IN_LIST FEATURES) + add_executable(102_DrawMesh "${SOURCE_PATH}/tutorial/102_DrawMesh/main.cpp") + target_link_libraries(102_DrawMesh PRIVATE igl::igl_glfw) + + add_executable(111_MatCap "${SOURCE_PATH}/tutorial/111_MatCap/main.cpp" "${CMAKE_CURRENT_LIST_DIR}/stb_image_implementation.c") + target_link_libraries(111_MatCap PRIVATE igl::igl_glfw igl::igl_stb) +endif() + +if("imgui" IN_LIST FEATURES) + add_executable(109_ImGuizmo "${SOURCE_PATH}/tutorial/109_ImGuizmo/main.cpp") + target_link_libraries(109_ImGuizmo PRIVATE igl::igl_imgui) + + add_executable(113_Shadows "${SOURCE_PATH}/tutorial/113_Shadows/main.cpp" "${CMAKE_CURRENT_LIST_DIR}/stb_image_implementation.c") + target_link_libraries(113_Shadows PRIVATE igl::igl_imgui igl::igl_stb) +endif() + +if("xml" IN_LIST FEATURES) + add_executable(601_Serialization "${SOURCE_PATH}/tutorial/601_Serialization/main.cpp") + target_link_libraries(601_Serialization PRIVATE igl::igl_xml) +endif() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/stb_image_implementation.c b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/stb_image_implementation.c new file mode 100644 index 0000000..9177288 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/project/stb_image_implementation.c @@ -0,0 +1,2 @@ +#define STB_IMAGE_IMPLEMENTATION +#include <stb_image.h> diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-libigl/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/vcpkg.json new file mode 100644 index 0000000..d288886 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-libigl/vcpkg.json @@ -0,0 +1,100 @@ +{ + "name": "vcpkg-ci-libigl", + "version-string": "ci", + "description": "Port to force features of libigl within CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "libigl", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + } + ], + "default-features": [ + { + "name": "cgal", + "platform": "!android & !(x86 & windows)" + }, + { + "name": "embree", + "platform": "linux | osx | (windows & !uwp & !arm)" + }, + { + "name": "glfw", + "platform": "!android" + }, + { + "name": "imgui", + "platform": "!android" + }, + "xml" + ], + "features": { + "cgal": { + "description": "libigl[cgal]", + "dependencies": [ + { + "name": "libigl", + "default-features": false, + "features": [ + "cgal", + "glfw" + ] + } + ] + }, + "embree": { + "description": "libigl[embree]", + "dependencies": [ + { + "name": "libigl", + "default-features": false, + "features": [ + "embree", + "glfw" + ] + } + ] + }, + "glfw": { + "description": "libigl[glfw] and stb", + "dependencies": [ + { + "name": "libigl", + "default-features": false, + "features": [ + "glfw" + ] + } + ] + }, + "imgui": { + "description": "libigl[imgui] and stb", + "dependencies": [ + { + "name": "libigl", + "default-features": false, + "features": [ + "imgui" + ] + } + ] + }, + "xml": { + "description": "libigl[xml]", + "dependencies": [ + { + "name": "libigl", + "default-features": false, + "features": [ + "xml" + ] + } + ] + } + } +} |