diff --git a/ports/vxl/portfile.cmake b/ports/vxl/portfile.cmake index c3124ce202..b566458064 100644 --- a/ports/vxl/portfile.cmake +++ b/ports/vxl/portfile.cmake @@ -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) \ No newline at end of file +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) diff --git a/ports/vxl/testlib.patch b/ports/vxl/testlib.patch new file mode 100644 index 0000000000..cc94aec562 --- /dev/null +++ b/ports/vxl/testlib.patch @@ -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) diff --git a/ports/vxl/vcpkg.json b/ports/vxl/vcpkg.json index c039f14ae2..fb87b04d29 100644 --- a/ports/vxl/vcpkg.json +++ b/ports/vxl/vcpkg.json @@ -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": { diff --git a/versions/baseline.json b/versions/baseline.json index 6c68c66f68..d35cb2a629 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7146,7 +7146,7 @@ }, "vxl": { "baseline": "2.0.2", - "port-version": 3 + "port-version": 4 }, "wampcc": { "baseline": "2019-09-04", diff --git a/versions/v-/vxl.json b/versions/v-/vxl.json index b6a8542616..80885d5e90 100644 --- a/versions/v-/vxl.json +++ b/versions/v-/vxl.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "7a84f7e74335e755ba16066fa148e3d30a9d5af5", + "version": "2.0.2", + "port-version": 4 + }, { "git-tree": "dd1be33b316bf4d081b89e1dd4a729ddfc09a8a6", "version-string": "2.0.2",