[vxl] no absolute paths (#21690)

* [vxl] no absolute paths

* [vxl] Disable build of testlib

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
autoantwort 2021-11-30 22:46:51 +01:00 committed by GitHub
parent 8e77ed422b
commit 2c5e3d573e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 11 deletions

View File

@ -15,6 +15,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix_dependency.patch
testlib.patch
)
set(USE_WIN_WCHAR_T OFF)
@ -22,9 +23,8 @@ if(VCPKG_TARGET_IS_WINDOWS)
set(USE_WIN_WCHAR_T ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DVXL_BUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
@ -45,12 +45,17 @@ vcpkg_configure_cmake(
-DVXL_USE_WIN_WCHAR_T=${USE_WIN_WCHAR_T}
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/vxl/cmake)
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# Remove tests which assume that the source dir still exists
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/vxl/vcl/vcl_where_root_dir.h")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/vxl/core/testlib")
file(INSTALL ${SOURCE_PATH}/core/vxl_copyright.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/vxl/cmake/VXLConfig.cmake" "${CURRENT_BUILDTREES_DIR}" "") # only used in comment
file(INSTALL "${SOURCE_PATH}/core/vxl_copyright.h" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

15
ports/vxl/testlib.patch Normal file
View File

@ -0,0 +1,15 @@
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 581d00b..336f170 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -135,7 +135,9 @@ else()
endif ()
# common test executable
-add_subdirectory(testlib)
+if(BUILD_TESTING)
+ add_subdirectory(testlib)
+endif()
# Tests that check and output the vxl configuration
# NOTE: some external projects remove the tests directory (aka ITK)

View File

@ -1,7 +1,7 @@
{
"name": "vxl",
"version-string": "2.0.2",
"port-version": 3,
"version": "2.0.2",
"port-version": 4,
"description": "A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding.",
"dependencies": [
"bzip2",
@ -11,6 +11,14 @@
"libpng",
"shapelib",
"tiff",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
],
"features": {

View File

@ -7146,7 +7146,7 @@
},
"vxl": {
"baseline": "2.0.2",
"port-version": 3
"port-version": 4
},
"wampcc": {
"baseline": "2019-09-04",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7a84f7e74335e755ba16066fa148e3d30a9d5af5",
"version": "2.0.2",
"port-version": 4
},
{
"git-tree": "dd1be33b316bf4d081b89e1dd4a729ddfc09a8a6",
"version-string": "2.0.2",