-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf-ble-driver] Initial version of nrf-ble-driver (#5938)
* Initial version of nrf-ble-driver * Add system dependencies message * Try to find git and add to path * Add status message to debug CI build * Remove status message; Add comments * Append instead of prepend to PATH * Enable x64-windows-static * Only show system dependencies message on mac and linux * Add arm64-windows support
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 99daa24..9a18ee5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -259,6 +259,9 @@ endforeach(SD_API_VER) | ||
# Additional special linkage libraries | ||
foreach(SD_API_VER ${SD_API_VERS}) | ||
if(WIN32) | ||
+ # arm64-windows support | ||
+ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "advapi32") | ||
+ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "advapi32") | ||
elseif(APPLE) | ||
target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") | ||
target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Source: nrf-ble-driver | ||
Version: 4.1.0 | ||
Description: BLE driver is a library for Bluetooth Low Energy communication using Nordic Semiconductor development kits. | ||
Build-Depends: asio, catch2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
include(vcpkg_common_functions) | ||
|
||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
message( | ||
"nrf-ble-driver currently requires the following libraries from the system package manager: | ||
libudev-dev | ||
These can be installed on Ubuntu systems via sudo apt install libudev-dev" | ||
) | ||
endif() | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO NordicSemiconductor/pc-ble-driver | ||
REF v4.1.0 | ||
SHA512 f8a995826caf4022f68b149d0f3619d1d656e3960a927eda29c634bf06cad8341c95a5b51ec7e50b28814f5332a4800faf88eb5b4e8ebec153f9cad05b3a703e | ||
HEAD_REF master | ||
PATCHES | ||
001-arm64-support.patch | ||
) | ||
|
||
# Ensure that git is found within CMakeLists.txt by appending vcpkg's git executable dirpath to $PATH. | ||
# Git should always be available as it is downloaded during the bootstrap phase. | ||
# Append instead of prepend to $PATH to honor the user's git executable as a general rule. | ||
find_program(GIT NAMES git git.cmd) | ||
get_filename_component(GIT_EXE_DIRPATH "${GIT}" DIRECTORY) | ||
set(ENV{PATH} "$ENV{PATH};${GIT_EXE_DIRPATH}") | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS -DDISABLE_EXAMPLES= -DDISABLE_TESTS= -DNRF_BLE_DRIVER_VERSION=4.1.0 -DCONNECTIVITY_VERSION=4.1.0 | ||
) | ||
|
||
vcpkg_install_cmake() | ||
vcpkg_copy_pdbs() | ||
vcpkg_fixup_cmake_targets() | ||
|
||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) | ||
file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) | ||
endif() | ||
|
||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |