Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vxl] Devendor triangle #41862

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ports/vxl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ vcpkg_from_github(
limits.diff
mingw.diff
openjpeg.diff
triangle.diff
)
file(GLOB_RECURSE vendored_sources "${SOURCE_PATH}/v3p/*.c" "${SOURCE_PATH}/v3p/*.cpp" "${SOURCE_PATH}/v3p/*.cxx")
list(FILTER vendored_sources EXCLUDE REGEX "/(netlib|openjpeg2)/")
file(REMOVE_RECURSE ${vendored_sources})
file(REMOVE_RECURSE ${vendored_sources} "${SOURCE_PATH}/v3p/netlib/triangle.c" "${SOURCE_PATH}/v3p/netlib/triangle.h")

vcpkg_check_features(OUT_FEATURE_OPTIONS options
FEATURES
Expand Down
33 changes: 33 additions & 0 deletions ports/vxl/triangle.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/config/cmake/Modules/VXLConfig_export.cmake.in b/config/cmake/Modules/VXLConfig_export.cmake.in
index c69b7d8..25e7168 100644
--- a/config/cmake/Modules/VXLConfig_export.cmake.in
+++ b/config/cmake/Modules/VXLConfig_export.cmake.in
@@ -1,3 +1,6 @@
+include(CMakeFindDependencyMacro)
+find_dependency(unofficial-triangle CONFIG)
+
# vxl/config/cmake/VXLConfig_export.cmake.in
#
# This CMake module is configured by VXL's build process to export the
diff --git a/v3p/netlib/CMakeLists.txt b/v3p/netlib/CMakeLists.txt
index 1c3df5d..3f44adf 100644
--- a/v3p/netlib/CMakeLists.txt
+++ b/v3p/netlib/CMakeLists.txt
@@ -7,15 +7,8 @@ set(netlib_sources
triangle.c triangle.h
)

-vxl_add_library(
- LIBRARY_NAME ${VXL_LIB_PREFIX}netlib
- LIBRARY_SOURCES ${netlib_sources}
- DISABLE_MSVC_MP
-)
-
-if(UNIX)
- target_link_libraries( ${VXL_LIB_PREFIX}netlib m )
-endif()
+find_package(unofficial-triangle CONFIG REQUIRED GLOBAL)
+add_library(${VXL_LIB_PREFIX}netlib ALIAS unofficial::triangle::triangle)

# Allow sources in subdirectories to see the include files.
include_directories(${netlib_SOURCE_DIR})
2 changes: 2 additions & 0 deletions ports/vxl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "vxl",
"version": "3.5.0",
"port-version": 1,
"description": "A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding.",
"homepage": "https://vxl.github.io/",
"license": null,
Expand All @@ -14,6 +15,7 @@
"name": "tiff",
"default-features": false
},
"triangle",
{
"name": "vcpkg-cmake",
"host": true
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4186,7 +4186,7 @@
},
"launch-darkly-server": {
"baseline": "2.9.3",
"port-version": 0
"port-version": 0
},
"lazy-importer": {
"baseline": "2023-08-03",
Expand Down Expand Up @@ -9514,7 +9514,7 @@
},
"vxl": {
"baseline": "3.5.0",
"port-version": 0
"port-version": 1
},
"wabt": {
"baseline": "1.0.36",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vxl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "96901ce32b149c940d9765217ae21cfaeeccf07f",
"version": "3.5.0",
"port-version": 1
},
{
"git-tree": "5678400bc3c92ba662f6678f51dc6ee1e1d6ece0",
"version": "3.5.0",
Expand Down