Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Fix/support install prefix take 2 #190

Merged
merged 16 commits into from
Jan 23, 2019
Merged

Conversation

kenr
Copy link
Contributor

@kenr kenr commented Jan 23, 2019

This PR make it possible to use pc-ble-driver (aka nrf-ble-driver) as a cmake module.
The implementation tries to follow established cmake, vcpkg and PC platform conventions.

To implement this support several things has been done:

  • renamed targets and artifact names from pc-ble-driver to nrf-ble-driver
    • library names now have proper naming for shared libraries (version, build type, etc)
  • moved header files so that they align with what cmake supports
  • install target puts files in different location than previous releases:
    • reduced include to one for each SoftDevice API version
  • CMAKE_INSTALL_PREFIX is used to determine the install folder for built artifacts

Example on how to use this project from CMakeLists.txt:

cmake_minimum_required(VERSION 3.11)
project(my-test-project)
find_package(nrf-ble-driver CONFIG REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main PRIVATE nrf::nrf_ble_driver_sd_api_v2_shared)

There are targets for all supported SoftDevice API versions:

nrf::nrf_ble_driver_sd_api_v2_shared
nrf::nrf_ble_driver_sd_api_v3_shared
nrf::nrf_ble_driver_sd_api_v5_shared
nrf::nrf_ble_driver_sd_api_v6_shared
nrf::nrf_ble_driver_sd_api_v2_static
nrf::nrf_ble_driver_sd_api_v3_static
nrf::nrf_ble_driver_sd_api_v5_static
nrf::nrf_ble_driver_sd_api_v6_static

We are having trouble pulling in the static libraries on Windows, that we need to revisit this at a later time.

@kenr kenr merged commit 16eef27 into master Jan 23, 2019
@kenr kenr deleted the fix/support-install-prefix-take-2 branch January 31, 2019 11:25
chunfantasy added a commit that referenced this pull request Mar 5, 2019
…e-driver

* 'master' of https://github.com/NordicSemiconductor/pc-ble-driver: (32 commits)
  Add status logging (#215)
  Feature/remove 115k2 baud rate support (#214)
  Fix/install dirs for tests examples (#213)
  Force armgcc toolchain version (#210)
  Adjust line in doc (#211)
  Remove test/example subdirectories, use what is provided by cmake (#212)
  Update documentation (#209)
  Remove baud wiggle (#204)
  Make creation of run test targets optional (#208)
  Check if status callback returns errors (#207)
  Update CMakeLists.txt (#203)
  Remove newline in log and status messages (#199)
  Fix/spurious errors advertising test (#197)
  Make terminate event happen earlier and stop adv/scan before closing (#196)
  Enable use of VCPKG_ROOT env variable (#195)
  Add hex as cmake module resource (#194)
  Fix/spurious error and compilation warning (#193)
  Add check of armgcc toolchain version (#192)
  Fix/advertise buffers (#191)
  Fix/support install prefix take 2 (#190)
  ...
mkarhumaa pushed a commit to mkarhumaa/pc-ble-driver that referenced this pull request Oct 25, 2021
* Allow for version 3.9 or whatever

* The access-error is because the GIL was not enabled before all SWIG functions. Adding a concept of ownership and recursive mutexes solves this, but may deadlock if they are placed poorly

* Update version number

Co-authored-by: Jørn Bøni Hofstad <jorn.hofstad@nordicsemi.no>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants