mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-13 07:36:39 +00:00
[ignition-fuel-tools1] Add new port (#8136)
Add new port for the ignition-fuel-tools version 1, part of the Ignition Robotics Libraries (https://ignitionrobotics.org/).
This commit is contained in:
parent
2f4cb2d5be
commit
4afc873253
@ -1,5 +1,5 @@
|
||||
Source: ignition-cmake0
|
||||
Version: 0.6.2
|
||||
Version: 0.6.2-1
|
||||
Homepage: https://ignitionrobotics.org/libs/cmake
|
||||
Description: CMake helper functions for building robotic applications
|
||||
Build-Depends: ignition-modularscripts
|
||||
|
16
ports/ignition-cmake0/fix-find-ign-curl.patch
Normal file
16
ports/ignition-cmake0/fix-find-ign-curl.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -r 3276aecbcbb4 -r 33b5d95affd2 cmake/FindIgnCURL.cmake
|
||||
--- a/cmake/FindIgnCURL.cmake
|
||||
+++ b/cmake/FindIgnCURL.cmake
|
||||
@@ -46,6 +46,12 @@
|
||||
|
||||
# Older versions of curl don't create imported targets, so we will create
|
||||
# them here if they have not been provided.
|
||||
+ if(TARGET CURL::libcurl AND NOT TARGET curl::curl)
|
||||
+ add_library(curl::curl INTERFACE IMPORTED)
|
||||
+ set_target_properties(curl::curl PROPERTIES
|
||||
+ INTERFACE_LINK_LIBRARIES CURL::libcurl)
|
||||
+ endif()
|
||||
+
|
||||
include(IgnImportTarget)
|
||||
|
||||
if(NOT TARGET curl::curl)
|
@ -14,6 +14,8 @@ ignition_modular_library(NAME cmake
|
||||
support-arm64.patch
|
||||
# Do not depend on pkg-config installed to find uuid
|
||||
uuid-do-not-require-pkg-config.patch
|
||||
# Fix FindIgnCURL.cmake (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/175)
|
||||
fix-find-ign-curl.patch
|
||||
)
|
||||
|
||||
# Permit empty include folder
|
||||
|
4
ports/ignition-fuel-tools1/CONTROL
Normal file
4
ports/ignition-fuel-tools1/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: ignition-fuel-tools1
|
||||
Version: 1.2.0
|
||||
Build-Depends: curl, ignition-cmake0, ignition-common1, libyaml, libzip, jsoncpp
|
||||
Description: Tools for using fuel API to download robot models
|
24
ports/ignition-fuel-tools1/link-correct-yaml-target.patch
Normal file
24
ports/ignition-fuel-tools1/link-correct-yaml-target.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -r 29939b8a25be -r 8a0a85e63950 CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -9,7 +9,7 @@
|
||||
# Find ignition-cmake
|
||||
#============================================================================
|
||||
# If you get an error at this line, you need to install ignition-cmake
|
||||
-find_package(ignition-cmake0 REQUIRED)
|
||||
+find_package(ignition-cmake0 0.4.1 REQUIRED)
|
||||
|
||||
#============================================================================
|
||||
# Configure the project
|
||||
diff -r 29939b8a25be -r 8a0a85e63950 src/CMakeLists.txt
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -52,7 +52,7 @@
|
||||
curl::curl
|
||||
ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER}
|
||||
${JSONCPP_TARGET}
|
||||
- YAML::YAML
|
||||
+ ${YAML_TARGET}
|
||||
ZIP::ZIP
|
||||
)
|
||||
|
10
ports/ignition-fuel-tools1/portfile.cmake
Normal file
10
ports/ignition-fuel-tools1/portfile.cmake
Normal file
@ -0,0 +1,10 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)
|
||||
|
||||
ignition_modular_library(NAME fuel-tools
|
||||
VERSION "1.2.0"
|
||||
CMAKE_PACKAGE_NAME ignition-fuel_tools1
|
||||
SHA512 5ed8d1429e1f5c0716e06840a4163f7e79a614cf7b6ff326adb69d35639e3ec5f1862edc41c6dc0bd21b16db6d13bee509831a66b10ca2ae3999649f1554a68e
|
||||
# Ensure yaml is correctly linked (backport of https://bitbucket.org/ignitionrobotics/ign-fuel-tools/pull-requests/103/use-yaml_target-instead-of-yaml-yaml/diff)
|
||||
PATCHES link-correct-yaml-target.patch)
|
@ -1,3 +1,3 @@
|
||||
Source: ignition-modularscripts
|
||||
Version: 2019-08-20
|
||||
Version: 2019-09-11
|
||||
Description: Vcpkg helpers to package ignition libraries
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH)
|
||||
function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME)
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
@ -8,21 +8,23 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/ignition-${NAME}${MAJOR_VERSION}")
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${CMAKE_PACKAGE_NAME}" TARGET_PATH "share/${CMAKE_PACKAGE_NAME}")
|
||||
|
||||
file(GLOB_RECURSE CMAKE_RELEASE_FILES
|
||||
"${CURRENT_PACKAGES_DIR}/lib/cmake/ignition-${NAME}${MAJOR_VERSION}/*")
|
||||
"${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*")
|
||||
|
||||
file(COPY ${CMAKE_RELEASE_FILES} DESTINATION
|
||||
"${CURRENT_PACKAGES_DIR}/share/ignition-${NAME}${MAJOR_VERSION}/")
|
||||
"${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/")
|
||||
|
||||
# Remove debug files
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
|
||||
${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
|
||||
|
||||
# Post-build test for cmake libraries
|
||||
vcpkg_test_cmake(PACKAGE_NAME ignition-${NAME}${MAJOR_VERSION})
|
||||
vcpkg_test_cmake(PACKAGE_NAME ${CMAKE_PACKAGE_NAME})
|
||||
|
||||
# Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE")
|
||||
@ -67,20 +69,25 @@ endfunction()
|
||||
##
|
||||
## ### PATCHES
|
||||
## A list of patches to be applied to the extracted sources.
|
||||
## This is forwarded to the `vcpkg_from_bitbucket` command.
|
||||
## This is forwarded to the `vcpkg_from_bitbucket` command.
|
||||
##
|
||||
## ### CMAKE_PACKAGE_NAME
|
||||
## The name of the CMake package for the port.
|
||||
## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}`.
|
||||
##
|
||||
## ## Examples:
|
||||
##
|
||||
## * [ignition-cmake0](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-cmake0/portfile.cmake)
|
||||
## * [ignition-math4](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-math4/portfile.cmake)
|
||||
## * [ignition-fuel-tools1](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-fuel-tools1/portfile.cmake)
|
||||
function(ignition_modular_library)
|
||||
set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF)
|
||||
set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF CMAKE_PACKAGE_NAME)
|
||||
set(multiValueArgs PATCHES)
|
||||
cmake_parse_arguments(IML "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
string(REPLACE "." ";" IML_VERSION_LIST ${IML_VERSION})
|
||||
list(GET IML_VERSION_LIST 0 IML_MAJOR_VERSION)
|
||||
|
||||
|
||||
# If the REF option is omitted, use the canonical one
|
||||
if(NOT DEFINED IML_REF)
|
||||
set(IML_REF "ignition-${IML_NAME}${IML_MAJOR_VERSION}_${IML_VERSION}")
|
||||
@ -90,6 +97,12 @@ function(ignition_modular_library)
|
||||
if(NOT DEFINED IML_HEAD_REF)
|
||||
set(IML_HEAD_REF "ign-${IML_NAME}${IML_MAJOR_VERSION}")
|
||||
endif()
|
||||
|
||||
# If the CMAKE_PACKAGE_NAME option is omitted, use the canonical one
|
||||
set(DEFAULT_CMAKE_PACKAGE_NAME "ignition-${IML_NAME}${IML_MAJOR_VERSION}")
|
||||
if(NOT DEFINED IML_CMAKE_PACKAGE_NAME)
|
||||
set(IML_CMAKE_PACKAGE_NAME ${DEFAULT_CMAKE_PACKAGE_NAME})
|
||||
endif()
|
||||
|
||||
# Download library from bitbucket, to support also the --head option
|
||||
vcpkg_from_bitbucket(
|
||||
@ -102,5 +115,5 @@ function(ignition_modular_library)
|
||||
)
|
||||
|
||||
# Build library
|
||||
ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH})
|
||||
ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME})
|
||||
endfunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user