Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comms-ublox] added new port #14523

Merged
merged 3 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions ports/comms-ublox/fix-comms.patch
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions ports/comms-ublox/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions ports/comms-ublox/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}