aboutsummaryrefslogtreecommitdiff
path: root/ports/ignition-modularscripts
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-06-24 23:59:32 +0200
committerGitHub <noreply@github.com>2020-06-24 14:59:32 -0700
commit70ab27fcad50241d72e0fe235ec4012f0ce7551e (patch)
treecccbd72ff215dcf3b66ae9d3aed2c61a8ebee693 /ports/ignition-modularscripts
parent7ced7d721e3e1da8f0df8634370f5698ec7a6e12 (diff)
downloadvcpkg-70ab27fcad50241d72e0fe235ec4012f0ce7551e.tar.gz
vcpkg-70ab27fcad50241d72e0fe235ec4012f0ce7551e.zip
[ignition-plugin1] Add new port 🤖 (#11275)
* [ignition-plugin1] Add new port * vcpkg_fixup_cmake_targets: Add DO_NOT_DELETE_PARENT_CONFIG_PATH By default the vcpkg_fixup_cmake_targets script remove the parent path of CONFIG_PATH if it named "cmake", this behaviour is not convenient for ports that install more than one CMake package config file, and for which vcpkg_fixup_cmake_targets is invoked multiple times. To optionally disable this behaviour, this commit adds the option DO_NOT_DELETE_PARENT_CONFIG_PATH to vcpkg_fixup_cmake_targets. * [ignition-modularscripts] Add support for ignition libraries that install multiple CMake package config files Some ignition libraries install several CMake package config files, to represent the different components of the library. This commit modifies the ignition_modular_library function to fixup correctly all the cmake package config files. * vcpkg_fixup_pkgconfig: Move definition of SYSTEM_LIBRARIES to vcpkg_common_definitions To correctly validate installed pkg-config files, vcpkg_fixup_pkgconfig needs to know for each platform which libraries are not managed by vcpkg. This commits improve this definitions for all the triplet supported by vcpkg, and move this definition to vcpkg_common_definitions in a way that permit custom triplets to overload its value.
Diffstat (limited to 'ports/ignition-modularscripts')
-rw-r--r--ports/ignition-modularscripts/CONTROL2
-rw-r--r--ports/ignition-modularscripts/ignition_modular_library.cmake18
2 files changed, 16 insertions, 4 deletions
diff --git a/ports/ignition-modularscripts/CONTROL b/ports/ignition-modularscripts/CONTROL
index 4dd2ac418..efde5f1b4 100644
--- a/ports/ignition-modularscripts/CONTROL
+++ b/ports/ignition-modularscripts/CONTROL
@@ -1,3 +1,3 @@
Source: ignition-modularscripts
-Version: 2020-05-09
+Version: 2020-05-16
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 8b04d8177..f7b772d5f 100644
--- a/ports/ignition-modularscripts/ignition_modular_library.cmake
+++ b/ports/ignition-modularscripts/ignition_modular_library.cmake
@@ -10,7 +10,18 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PAC
# If necessary, move the CMake config files
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake")
- vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${CMAKE_PACKAGE_NAME}" TARGET_PATH "share/${CMAKE_PACKAGE_NAME}")
+ # Some ignition libraries install library subcomponents, that are effectively additional cmake packages
+ # with name ${CMAKE_PACKAGE_NAME}-${COMPONENT_NAME}, so it is needed to call vcpkg_fixup_cmake_targets for them as well
+ file(GLOB COMPONENTS_CMAKE_PACKAGE_NAMES
+ LIST_DIRECTORIES TRUE
+ RELATIVE "${CURRENT_PACKAGES_DIR}/lib/cmake/"
+ "${CURRENT_PACKAGES_DIR}/lib/cmake/*")
+
+ foreach(COMPONENT_CMAKE_PACKAGE_NAME IN LISTS COMPONENTS_CMAKE_PACKAGE_NAMES)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${COMPONENT_CMAKE_PACKAGE_NAME}"
+ TARGET_PATH "share/${COMPONENT_CMAKE_PACKAGE_NAME}"
+ DO_NOT_DELETE_PARENT_CONFIG_PATH)
+ endforeach()
file(GLOB_RECURSE CMAKE_RELEASE_FILES
"${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*")
@@ -19,8 +30,9 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PAC
"${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/")
endif()
- # Remove debug files
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
+ # Remove unused files files
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake
+ ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/debug/share)