Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions ports/sbp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Windows shared libraries are not supported yet
# See https://github.com/swift-nav/libsbp/issues/1062
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO swift-nav/libsbp
REF v3.4.10
SHA512 bbdcefad9ff8995759b577790bcffb94355bd0ee29f259fa8d51f54907e252b55871dc5a841e21d23e661fd5b33109761eb20b66c2fb73e9e7de8a34cc8d6528
HEAD_REF master
PATCHES
"win32-install-fix.patch"
)

vcpkg_from_github(
OUT_SOURCE_PATH CMAKE_EXTRA_MODS
Comment thread
JonLiu1993 marked this conversation as resolved.
Outdated
REPO swift-nav/cmake
REF 373d4fcafbbc0c208dc9ecb278d36ed8c9448eda
SHA512 afefc8c7a3fb43ee65b9b8733968a5836938460abbf1bc9e8330f83c3ac4a5819f71a36dcb034004296161c592f4d61545ba10016d6666e7eaf1dca556d99e2e
HEAD_REF master
)

# Copy cmake files to expected location
file(INSTALL ${CMAKE_EXTRA_MODS}/CCache.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/SwiftCmakeOptions.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/CompileOptions.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/LanguageStandards.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/ClangFormat.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/ClangTidy.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/CodeCoverage.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)
file(INSTALL ${CMAKE_EXTRA_MODS}/TestTargets.cmake DESTINATION ${SOURCE_PATH}/c/cmake/common)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/c"
OPTIONS
-Dlibsbp_ENABLE_TESTS=OFF
-Dlibsbp_ENABLE_DOCS=OFF
)

vcpkg_cmake_install()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
18 changes: 18 additions & 0 deletions ports/sbp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "sbp",
"version-semver": "3.4.10",
"description": "Swift Navigation Binary Protocol (SBP) is a binary protocol for communicating GNSS data used by Piksi devices.",
"homepage": "https://github.com/swift-nav/libsbp",
"documentation": "https://support.swiftnav.com/support/solutions/articles/44001850782-swift-binary-protocol",
"supports": "!uwp",
Comment thread
jayvdb marked this conversation as resolved.
Outdated
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
27 changes: 27 additions & 0 deletions ports/sbp/win32-install-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
commit 6023d12ca2df861b134b345151d2463a963e50c4
Author: Rodrigo Reichert <rodrigo.reichert@swift-nav.com>
Date: Wed Aug 4 13:24:43 2021 +1000

ESD-2166 Fix windows install dll directory (#1061)

diff --git a/c/src/CMakeLists.txt b/c/src/CMakeLists.txt
index b00fa523..1019683f 100644
--- a/c/src/CMakeLists.txt
+++ b/c/src/CMakeLists.txt
@@ -27,9 +27,13 @@ if (MINGW)
endif()
endif()

-install(TARGETS sbp
- EXPORT sbp-export
- DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+install(
+ TARGETS sbp
+ EXPORT sbp-export
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/libsbp/" DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/libsbp")

export(EXPORT sbp-export
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5796,6 +5796,10 @@
"baseline": "3.6.1",
"port-version": 1
},
"sbp": {
"baseline": "3.4.10",
"port-version": 0
},
"scintilla": {
"baseline": "4.4.6",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/sbp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "755e76e1852508e6ffd88cdf7351415d41abf7af",
"version-semver": "3.4.10",
"port-version": 0
}
]
}