diff options
| -rw-r--r-- | ports/comms-ublox/fix-comms.patch | 23 | ||||
| -rw-r--r-- | ports/comms-ublox/portfile.cmake | 28 | ||||
| -rw-r--r-- | ports/comms-ublox/vcpkg.json | 10 |
3 files changed, 61 insertions, 0 deletions
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" + ] +} |
