diff --git a/ports/sdformat6/portfile.cmake b/ports/sdformat6/portfile.cmake index 6e32429e37285a..8818b2be88088e 100644 --- a/ports/sdformat6/portfile.cmake +++ b/ports/sdformat6/portfile.cmake @@ -16,41 +16,43 @@ get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) set(_path $ENV{PATH}) vcpkg_add_to_path(${RUBY_PATH}) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_TESTING=OFF -DUSE_EXTERNAL_URDF=ON -DUSE_EXTERNAL_TINYXML=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() # Restore original path set(ENV{PATH} ${_path}) # Move location of sdformat.dll from lib to bin -if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll - ${CURRENT_PACKAGES_DIR}/bin/sdformat.dll) +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/sdformat.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/sdformat.dll" + "${CURRENT_PACKAGES_DIR}/bin/sdformat.dll") endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll") + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll" + "${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll") endif() # Fix cmake targets location -vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat") +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sdformat") # Remove debug files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include - ${CURRENT_PACKAGES_DIR}/debug/lib/cmake - ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/lib/cmake" + "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/ignition/sdformat6.yaml" "${CURRENT_PACKAGES_DIR}" "../..") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sdformat-6.2/sdf/sdf_config.h" "#define SDF_SHARE_PATH \"${CURRENT_PACKAGES_DIR}/share/\"" "") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sdformat-6.2/sdf/sdf_config.h" "#define SDF_VERSION_PATH \"${CURRENT_PACKAGES_DIR}/share/sdformat/\"" "") # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) vcpkg_fixup_pkgconfig() diff --git a/ports/sdformat6/vcpkg.json b/ports/sdformat6/vcpkg.json index 935b1be224ea16..f1ee8fccbabffe 100644 --- a/ports/sdformat6/vcpkg.json +++ b/ports/sdformat6/vcpkg.json @@ -1,7 +1,7 @@ { "name": "sdformat6", "version": "6.2.0", - "port-version": 3, + "port-version": 4, "description": "Simulation Description Format (SDF) parser and description files.", "homepage": "http://sdformat.org/", "supports": "!(arm | uwp)", @@ -10,6 +10,14 @@ "boost-variant", "ignition-math4", "tinyxml", - "urdfdom" + "urdfdom", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] } diff --git a/versions/baseline.json b/versions/baseline.json index cb6d1f996d864a..9a41e108baa404 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6094,7 +6094,7 @@ }, "sdformat6": { "baseline": "6.2.0", - "port-version": 3 + "port-version": 4 }, "sdformat9": { "baseline": "9.4.0", diff --git a/versions/s-/sdformat6.json b/versions/s-/sdformat6.json index e664b40922444b..2429b11d27f2cd 100644 --- a/versions/s-/sdformat6.json +++ b/versions/s-/sdformat6.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "dc94f6d1e0351bb777ccd1823470fe22ad896c34", + "version": "6.2.0", + "port-version": 4 + }, { "git-tree": "1273532dcedd66beb82c6ce89024abac0e385761", "version": "6.2.0",