aboutsummaryrefslogtreecommitdiff
path: root/ports/ignition-modularscripts
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-05-12 00:57:50 +0200
committerGitHub <noreply@github.com>2020-05-11 15:57:50 -0700
commit09b769bf5e8d88efd5a3d062a5144d5bf850c8a6 (patch)
treefff4663895046688be7bc8a9b387b6b2b6a66fda /ports/ignition-modularscripts
parenta64cf52dd52a001957a5e6e315cdf7188c2842ca (diff)
downloadvcpkg-09b769bf5e8d88efd5a3d062a5144d5bf850c8a6.tar.gz
vcpkg-09b769bf5e8d88efd5a3d062a5144d5bf850c8a6.zip
[eigen3] [ignition-modularscripts] Fix installed pkgconfig files (#11270)
* [eigen3] Fix generated pkgconfig files * [ignition-cmake2] Update to C++ library Now ignition-cmake also installs a C++ library, so it is possible to remove code specific for CMake-only ports. * [ignition-modularscripts] Fix pkgconfig files installed by ignition libraries Use the new function vcpkg_fixup_pkgconfig to fix the installed .pc pkgconfig files of the ignition libraries. As ignition-fuel-tools1 depends on curl that has a broken pkg-config file, disable installation of its pkg-config files.
Diffstat (limited to 'ports/ignition-modularscripts')
-rw-r--r--ports/ignition-modularscripts/CONTROL2
-rw-r--r--ports/ignition-modularscripts/ignition_modular_library.cmake35
2 files changed, 26 insertions, 11 deletions
diff --git a/ports/ignition-modularscripts/CONTROL b/ports/ignition-modularscripts/CONTROL
index 776c16695..4dd2ac418 100644
--- a/ports/ignition-modularscripts/CONTROL
+++ b/ports/ignition-modularscripts/CONTROL
@@ -1,3 +1,3 @@
Source: ignition-modularscripts
-Version: 2020-04-16
+Version: 2020-05-09
Description: Vcpkg helpers to package ignition libraries
diff --git a/ports/ignition-modularscripts/ignition_modular_library.cmake b/ports/ignition-modularscripts/ignition_modular_library.cmake
index c8575978b..8b04d8177 100644
--- a/ports/ignition-modularscripts/ignition_modular_library.cmake
+++ b/ports/ignition-modularscripts/ignition_modular_library.cmake
@@ -1,5 +1,5 @@
-function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME)
+function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME IML_DISABLE_PKGCONFIG_INSTALL)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -17,11 +17,19 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PAC
file(COPY ${CMAKE_RELEASE_FILES} DESTINATION
"${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)
+ endif()
+
+ # Remove debug files
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
+ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/share)
+
+ # Make pkg-config files relocatable
+ if(NOT IML_DISABLE_PKGCONFIG_INSTALL)
+ vcpkg_fixup_pkgconfig()
+ else()
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig
+ ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
endif()
# Find the relevant license file and install it
@@ -44,7 +52,9 @@ endfunction()
## SHA512 <sha512>
## [REF <ref>]
## [HEAD_REF <head_ref>]
-## [PATCHES <patches>])
+## [PATCHES <patches>]
+## [CMAKE_PACKAGE_NAME <cmake_package_name>]
+## [DISABLE_PKGCONFIG_INSTALL])
## ```
##
## ## Parameters:
@@ -72,6 +82,10 @@ endfunction()
## ### CMAKE_PACKAGE_NAME
## The name of the CMake package for the port.
## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}`.
+##
+## ### DISABLE_PKGCONFIG_INSTALL
+## If present, disable installation of .pc pkg-config configuration files.
+##
##
## ## Examples:
##
@@ -79,9 +93,10 @@ endfunction()
## * [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(options DISABLE_PKGCONFIG_INSTALL)
set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF CMAKE_PACKAGE_NAME)
set(multiValueArgs PATCHES)
- cmake_parse_arguments(IML "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+ cmake_parse_arguments(IML "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
string(REPLACE "." ";" IML_VERSION_LIST ${IML_VERSION})
list(GET IML_VERSION_LIST 0 IML_MAJOR_VERSION)
@@ -101,7 +116,7 @@ function(ignition_modular_library)
if(NOT DEFINED IML_CMAKE_PACKAGE_NAME)
set(IML_CMAKE_PACKAGE_NAME ${DEFAULT_CMAKE_PACKAGE_NAME})
endif()
-
+
# Download library from github, to support also the --head option
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -113,5 +128,5 @@ function(ignition_modular_library)
)
# Build library
- ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME})
+ ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME} ${IML_DISABLE_PKGCONFIG_INSTALL})
endfunction()