mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:13:07 +08:00
[sbp] new port (#19335)
* [sbp] new port Closes https://github.com/microsoft/vcpkg/issues/19218 * update portfile.cmake * update version * add vcpkg_fail_port_install for portifile * update version Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
parent
35312384e7
commit
cce4bf5dff
47
ports/sbp/portfile.cmake
Normal file
47
ports/sbp/portfile.cmake
Normal file
@ -0,0 +1,47 @@
|
||||
# Windows shared libraries are not supported yet
|
||||
# See https://github.com/swift-nav/libsbp/issues/1062
|
||||
vcpkg_fail_port_install(ON_TARGET "uwp")
|
||||
|
||||
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
|
||||
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
ports/sbp/vcpkg.json
Normal file
18
ports/sbp/vcpkg.json
Normal file
@ -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",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
27
ports/sbp/win32-install-fix.patch
Normal file
27
ports/sbp/win32-install-fix.patch
Normal file
@ -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
|
@ -5812,6 +5812,10 @@
|
||||
"baseline": "3.6.1",
|
||||
"port-version": 1
|
||||
},
|
||||
"sbp": {
|
||||
"baseline": "3.4.10",
|
||||
"port-version": 0
|
||||
},
|
||||
"scintilla": {
|
||||
"baseline": "4.4.6",
|
||||
"port-version": 0
|
||||
|
9
versions/s-/sbp.json
Normal file
9
versions/s-/sbp.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d3d3511804be8ef1277c4bce734379748ee615f4",
|
||||
"version-semver": "3.4.10",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user