Skip to content

Commit

Permalink
[nrf-ble-driver] Remove possible conflicting files (microsoft#25900)
Browse files Browse the repository at this point in the history
* Fix possible conflicting license file

* version

* update license

* format

* version

* UWP can't handle drivers

* version
  • Loading branch information
Thomas1664 authored Jul 22, 2022
1 parent a84a843 commit f93ba15
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 26 deletions.
43 changes: 24 additions & 19 deletions ports/nrf-ble-driver/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,39 @@ vcpkg_from_github(
# 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.2 -DCONNECTIVITY_VERSION=4.1.2
vcpkg_find_acquire_program(GIT)
get_filename_component(GIT_EXE_PATH "${GIT}" DIRECTORY)
vcpkg_add_to_path("${GIT_EXE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDISABLE_EXAMPLES=ON
-DDISABLE_TESTS=ON
-DNRF_BLE_DRIVER_VERSION=4.1.2
-DCONNECTIVITY_VERSION=4.1.2
MAYBE_UNUSED_VARIABLES
DISABLE_EXAMPLES
DISABLE_TESTS
)

vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
vcpkg_cmake_config_fixup()

# Copy hex files into shared folder for package
foreach(HEX_DIR IN ITEMS "sd_api_v2" "sd_api_v3" "sd_api_v5" "sd_api_v6")
set(TARGET_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/hex/${HEX_DIR}")
file(MAKE_DIRECTORY ${TARGET_DIRECTORY})
file(INSTALL "${SOURCE_PATH}/hex/${HEX_DIR}" DESTINATION ${TARGET_DIRECTORY}/..)
file(MAKE_DIRECTORY "${TARGET_DIRECTORY}")
file(INSTALL "${SOURCE_PATH}/hex/${HEX_DIR}" DESTINATION "${TARGET_DIRECTORY}/..")
endforeach()

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)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)

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)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
18 changes: 14 additions & 4 deletions ports/nrf-ble-driver/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
{
"name": "nrf-ble-driver",
"version-string": "4.1.2",
"port-version": 1,
"version": "4.1.2",
"port-version": 2,
"description": "BLE driver is a library for Bluetooth Low Energy communication using Nordic Semiconductor development kits.",
"homepage": "https://github.com/NordicSemiconductor/pc-ble-driver",
"license": "BSD-3-Clause",
"supports": "!uwp",
"dependencies": [
"asio",
"catch2",
"cli11",
"spdlog"
"spdlog",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 0 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,6 @@ nativefiledialog:x64-uwp=fail
ngspice:x64-windows-static=fail
nng:arm-uwp=fail
nng:x64-uwp=fail
nrf-ble-driver:arm-uwp=fail
nrf-ble-driver:x64-uwp=fail
numactl:arm64-windows=fail
numactl:arm-uwp=fail
numactl:x64-osx=fail
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4966,7 +4966,7 @@
},
"nrf-ble-driver": {
"baseline": "4.1.2",
"port-version": 1
"port-version": 2
},
"nspr": {
"baseline": "4.33",
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nrf-ble-driver.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "82619c9f6f7860cb053b79c1091a39e0483b7d85",
"version": "4.1.2",
"port-version": 2
},
{
"git-tree": "f0f55511374a869316d374399923f94dc25c4150",
"version-string": "4.1.2",
Expand Down

0 comments on commit f93ba15

Please sign in to comment.