From 2f847cedfa76ccb1ce7ca69974af13088f3054ba Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Thu, 12 Nov 2020 22:27:47 +0100 Subject: [comms-ublox] added new port (#14523) * add comms-ublox * forgot the dependencies * Fix naming of cmake variables --- ports/comms-ublox/fix-comms.patch | 23 +++++++++++++++++++++++ ports/comms-ublox/portfile.cmake | 28 ++++++++++++++++++++++++++++ ports/comms-ublox/vcpkg.json | 10 ++++++++++ 3 files changed, 61 insertions(+) create mode 100644 ports/comms-ublox/fix-comms.patch create mode 100644 ports/comms-ublox/portfile.cmake create mode 100644 ports/comms-ublox/vcpkg.json diff --git a/ports/comms-ublox/fix-comms.patch b/ports/comms-ublox/fix-comms.patch new file mode 100644 index 000000000..c1619bfc2 --- /dev/null +++ b/ports/comms-ublox/fix-comms.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2b69fe..aff5917 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,6 +66,7 @@ endif () + ###################################################################### + + # Use external CommsChampion project or compile it in place ++if(FALSE) + set (CC_EXTERNAL_TGT "comms_champion_external") + if (OPT_BUILD_TEST OR OPT_BUILD_PLUGIN) + set (external_cc_needed TRUE) +@@ -107,6 +108,10 @@ elseif (external_cc_needed) + find_package(CommsChampion NO_MODULE) + set (cc_compile_file "${OPT_CC_MAIN_INSTALL_DIR}/lib/LibComms/cmake/CC_Compile.cmake") + endif () ++else() ++ find_package(LibComms CONFIG REQUIRED) ++ set(cc_compile_file ${LibComms_DIR}/CC_Compile.cmake) ++endif() + + if (EXISTS ${cc_compile_file}) + # Set compiler flags diff --git a/ports/comms-ublox/portfile.cmake b/ports/comms-ublox/portfile.cmake new file mode 100644 index 000000000..e308ccd7b --- /dev/null +++ b/ports/comms-ublox/portfile.cmake @@ -0,0 +1,28 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commschamp/cc.ublox.generated + REF v0.19.1 + SHA512 4f599bc052ea4f4dd4158c7e2d2bd4020393802d8f2bcd97637a618190789cd5797e3e3b56da868949a261d1d4a34b4bf613a97ad28e0da87f82b3f5452498e7 + HEAD_REF master + PATCHES + fix-comms.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPT_BUILD_TEST=OFF + -DOPT_BUILD_PLUGIN=OFF + -DOPT_NO_COMMS=ON + -DOPT_EXTERNALS_UPDATE_DISCONNECTED=ON +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/comms-ublox/vcpkg.json b/ports/comms-ublox/vcpkg.json new file mode 100644 index 000000000..30825b80c --- /dev/null +++ b/ports/comms-ublox/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "comms-ublox", + "version-string": "0.19.1", + "description": "UBLOX (UBX) protocol definition, generated out of cc.ublox.commsdsl", + "homepage": "https://commschamp.github.io/", + "documentation": "https://github.com/commschamp/cc.ublox.generated", + "dependencies": [ + "comms" + ] +} -- cgit v1.2.3