aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Traversaro <silvio.traversaro@iit.it>2020-03-11 00:49:53 +0100
committerGitHub <noreply@github.com>2020-03-10 16:49:53 -0700
commit249b8555eb9e83ca40461f3f8f2c8a88b745d15f (patch)
treea9b3c7d25cb7b618ab1d94b1819e122a15992418
parentb813a777e8424a30116ea2a3d32973a5cfdbb005 (diff)
downloadvcpkg-249b8555eb9e83ca40461f3f8f2c8a88b745d15f.tar.gz
vcpkg-249b8555eb9e83ca40461f3f8f2c8a88b745d15f.zip
[ignition-cmake2] Add new port 🤖 (#10014)
* ignition-modularscripts: move CMake config files only if necessary Some ignition libraries (such as ignition-cmake2) already install the CMake config file in the location required by vcpkg * Add new port ignition-cmake2
-rw-r--r--ports/ignition-cmake2/CONTROL5
-rw-r--r--ports/ignition-cmake2/portfile.cmake16
-rw-r--r--ports/ignition-cmake2/usage3
-rw-r--r--ports/ignition-modularscripts/CONTROL2
-rw-r--r--ports/ignition-modularscripts/ignition_modular_library.cmake26
5 files changed, 37 insertions, 15 deletions
diff --git a/ports/ignition-cmake2/CONTROL b/ports/ignition-cmake2/CONTROL
new file mode 100644
index 000000000..455beb85f
--- /dev/null
+++ b/ports/ignition-cmake2/CONTROL
@@ -0,0 +1,5 @@
+Source: ignition-cmake2
+Version: 2.1.1
+Homepage: https://ignitionrobotics.org/libs/cmake
+Description: CMake helper functions for building robotic applications
+Build-Depends: ignition-modularscripts
diff --git a/ports/ignition-cmake2/portfile.cmake b/ports/ignition-cmake2/portfile.cmake
new file mode 100644
index 000000000..5bc63eec1
--- /dev/null
+++ b/ports/ignition-cmake2/portfile.cmake
@@ -0,0 +1,16 @@
+include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake)
+
+set(PACKAGE_VERSION "2.1.1")
+
+ignition_modular_library(NAME cmake
+ VERSION ${PACKAGE_VERSION}
+ SHA512 4d22a45ccc9582c7e4b370b884511782d1629fa3e257dd92300388b5050d22fa63dd4a6ef8942abb9ebbc300df4cd526d1d8a7088a92b0073e152c16c7b97e2b)
+
+# Permit empty include folder
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
+
+# Remove unneccessary directory, as ignition-cmake is a pure CMake package
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug)
+
+# Install custom usage
+configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
diff --git a/ports/ignition-cmake2/usage b/ports/ignition-cmake2/usage
new file mode 100644
index 000000000..b62ba0c76
--- /dev/null
+++ b/ports/ignition-cmake2/usage
@@ -0,0 +1,3 @@
+The package ignition-cmake2 provides CMake integration:
+
+ find_package(ignition-cmake2 CONFIG REQUIRED)
diff --git a/ports/ignition-modularscripts/CONTROL b/ports/ignition-modularscripts/CONTROL
index 796056b10..2ea04f67a 100644
--- a/ports/ignition-modularscripts/CONTROL
+++ b/ports/ignition-modularscripts/CONTROL
@@ -1,3 +1,3 @@
Source: ignition-modularscripts
-Version: 2019-09-11
+Version: 2020-02-10
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 5672ab8f4..8ce00116b 100644
--- a/ports/ignition-modularscripts/ignition_modular_library.cmake
+++ b/ports/ignition-modularscripts/ignition_modular_library.cmake
@@ -8,23 +8,21 @@ function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PAC
vcpkg_install_cmake()
- vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${CMAKE_PACKAGE_NAME}" TARGET_PATH "share/${CMAKE_PACKAGE_NAME}")
+ # 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}")
- file(GLOB_RECURSE CMAKE_RELEASE_FILES
- "${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*")
+ file(GLOB_RECURSE CMAKE_RELEASE_FILES
+ "${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*")
- file(COPY ${CMAKE_RELEASE_FILES} DESTINATION
- "${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/")
+ 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)
-
-
-
- # Post-build test for cmake libraries
- vcpkg_test_cmake(PACKAGE_NAME ${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()
# Find the relevant license file and install it
if(EXISTS "${SOURCE_PATH}/LICENSE")