diff options
| author | Mathis <mathisloge@gmail.com> | 2021-08-31 03:25:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-30 18:25:10 -0700 |
| commit | 0997386f6be36ea3e90cfebd26727921ff212ded (patch) | |
| tree | 2624a121d564f1f300679dfb422efa10d6a1fab5 /ports/comms | |
| parent | ce45dd94d53cd489140cd79b5d51d58604656391 (diff) | |
| download | vcpkg-0997386f6be36ea3e90cfebd26727921ff212ded.tar.gz vcpkg-0997386f6be36ea3e90cfebd26727921ff212ded.zip | |
[comms,commsdsl,comms-ublox] update ports (#19581)
* update comms, add tools feature; update commsdsl
* update versions
* update comms-ublox
* update version
* add quotes to paths
* version
* fix comms dir remove
* version
* remove VCPKG_POLICY_DLLS_WITHOUT_LIBS
* version
* fix some paths
* version
* only allow build of tools if triplet is dynamic
* version
* fail on static
* version
* replace deprecated functions and replace options
* version
* fix
* fix 2
* update version
* apply @JackBoosY suggestions
* version
* Update ports/comms/portfile.cmake
* Update versions/c-/comms.json
* add @NancyLi1013 suggestions
* update versions
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Diffstat (limited to 'ports/comms')
| -rw-r--r-- | ports/comms/portfile.cmake | 64 | ||||
| -rw-r--r-- | ports/comms/vcpkg.json | 22 |
2 files changed, 70 insertions, 16 deletions
diff --git a/ports/comms/portfile.cmake b/ports/comms/portfile.cmake index 7e2f95df0..3ec544e2f 100644 --- a/ports/comms/portfile.cmake +++ b/ports/comms/portfile.cmake @@ -3,24 +3,60 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO commschamp/comms_champion
- REF v3.3
- SHA512 c60dc6c1ab67a2a5e26468255151ff9f5cbf4a2d7824c8f2ed0f8648b51170150fba26ab6072de9733b8b6e60272f28610d41d6b9df7994a0406f78aed5c686e
+ REF v3.4
+ SHA512 573afbc0aebd72d8a047067410f0f54588675c4cbad37f824edbb6d8303e9c191c573ac9325bf5fec575dffd3d05562c04e75c1e5b748a34d01056bc8b766fb1
HEAD_REF master
)
-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
+vcpkg_check_features(
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ tools CC_BUILD_TOOLS_LIBRARY
+ tools CC_INSTALL_TOOLS_LIBRARY
+ tools CC_BUILD_TOOLS
+ tools CC_INSTALL_TOOLS
+)
+
+# check before configure
+if("tools" IN_LIST FEATURES)
+ vcpkg_fail_port_install(ON_LIBRARY_LINKAGE "static" MESSAGE "Feature 'Tools' can't be built statically")
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
- -DCC_COMMS_LIB_ONLY=ON
- -DCC_NO_UNIT_TESTS=ON
+ ${FEATURE_OPTIONS}
+ -DCC_INSTALL_COMMS_LIB=ON
+ -DCC_BUILD_UNIT_TESTS=OFF
+ -DCC_WARN_AS_ERR=OFF
+ -DCC_BUILD_DEMO_PROTOCOL=OFF
+ -DCC_INSTALL_DEMO_PROTOCOL=OFF
)
-vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/LibComms/cmake TARGET_PATH share/LibComms)
-# currently this is only a header only library. after moving lib/LibComms to share this lib path will be empty
-file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
-file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME "LibComms" CONFIG_PATH "lib/LibComms/cmake" )
+
+if("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(
+ TOOL_NAMES cc_dump cc_view
+ AUTO_CLEAN
+ )
+ file(INSTALL "${CURRENT_PACKAGES_DIR}/lib/CommsChampion/plugin"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/lib/CommsChampion/plugin")
+ vcpkg_cmake_config_fixup(PACKAGE_NAME "CommsChampion" CONFIG_PATH "lib/CommsChampion/cmake")
+
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/LibComms")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/CommsChampion")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/LibComms")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/CommsChampion")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+else()
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+endif()
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
-configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
+configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" @ONLY)
diff --git a/ports/comms/vcpkg.json b/ports/comms/vcpkg.json index 62821a8bf..677032b11 100644 --- a/ports/comms/vcpkg.json +++ b/ports/comms/vcpkg.json @@ -1,7 +1,25 @@ { "name": "comms", - "version-semver": "3.3.0", + "version-semver": "3.4.0", "description": "COMMS is the C++(11) headers only, platform independent library, which makes the implementation of a communication protocol to be an easy and relatively quick process.", "homepage": "https://commschamp.github.io/", - "documentation": "https://github.com/commschamp/comms_champion" + "documentation": "https://github.com/commschamp/comms_champion", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "tools": { + "description": "Builds CommsChampion tools", + "dependencies": [ + "qt5-base" + ] + } + } } |
