This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pc-ble-driver build up error on windows

Hi,

I want to build up a test software to test our product.

I find out pc-ble-driver that might be conformed our requirement and follow up below link to set up environment on windows 10

https://github.com/NordicSemiconductor/pc-ble-driver

And, I use visual studio 2019 to set up.

But, I encounter a issue in chapter Compiling pc-ble-driver from source step 2.

2. CMake Select the Visual Studio compiler to use according to this article: Build C/C++ code on the command line

$ cmake -G Ninja ..

Command line display error message as below:

-- NRF_BLE_DRIVER_VERSION not specified, setting it to 0.0.0
-- Architecture not set, using native 32-bit toolchain.
CMake Error at test/CMakeLists.txt:18 (find_package):
  Could not find a package configuration file provided by "Catch2" with any
  of the following names:

    Catch2Config.cmake
    catch2-config.cmake

  Add the installation prefix of "Catch2" to CMAKE_PREFIX_PATH or set
  "Catch2_DIR" to a directory containing one of the above files.  If "Catch2"
  provides a separate development package or SDK, be sure it has been
  installed.

I change CMakeLists.txt in pc-ble-driver-master\test folder.

From

find_package(spdlog CONFIG REQUIRED)

To

if(NOT TARGET spdlog)
    # Stand-alone build
    set(SPDLOG_DIR "C:\\dev\\spdlog")
    find_package(spdlog CONFIG REQUIRED)
endif()

After changed, it still display same error message.

Kindly guide me through the problem.

Thank you.

Related