mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-07 06:40:01 +00:00
test: use pkg-config to find cpputest in CMake builds
This commit is contained in:
parent
e44d8d3690
commit
c589a9bb89
@ -7,11 +7,11 @@ include_directories(${LIBUSB_INCLUDE_DIRS})
|
||||
link_directories(${LIBUSB_LIBRARY_DIRS})
|
||||
link_libraries(${LIBUSB_LIBRARIES})
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
include_directories(.)
|
||||
include_directories(..)
|
||||
|
@ -4,11 +4,14 @@ project(test-tlv-test)
|
||||
|
||||
set (BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../../)
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
include_directories(../../3rd-party/micro-ecc)
|
||||
include_directories(../../3rd-party/rijndael)
|
||||
|
@ -4,11 +4,14 @@ project(test-gap)
|
||||
# find pkgconfig
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
include_directories(.)
|
||||
include_directories(../../src)
|
||||
|
@ -1,11 +1,14 @@
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project(test-hfp)
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
include_directories(.)
|
||||
include_directories(..)
|
||||
|
@ -1,11 +1,14 @@
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project(gatt-client-test)
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
# set include paths
|
||||
include_directories(.)
|
||||
|
@ -1,11 +1,14 @@
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project(gatt-client-test)
|
||||
|
||||
# add CppUTest
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
link_libraries( CppUTest )
|
||||
link_libraries( CppUTestExt )
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
# set include paths
|
||||
include_directories(.)
|
||||
|
@ -79,13 +79,18 @@ foreach(EXAMPLE_FILE ${EXAMPLES_C})
|
||||
target_link_libraries(${EXAMPLE} btstack)
|
||||
endforeach(EXAMPLE_FILE)
|
||||
|
||||
## hard-coded tests that use CPPUtest
|
||||
# pkgconfig required to link cpputest
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# CppuTest
|
||||
pkg_check_modules(CPPUTEST REQUIRED CppuTest)
|
||||
include_directories(${CPPUTEST_INCLUDE_DIRS})
|
||||
link_directories(${CPPUTEST_LIBRARY_DIRS})
|
||||
link_libraries(${CPPUTEST_LIBRARIES})
|
||||
|
||||
message("example mesh_message_test")
|
||||
include_directories( /usr/local/include)
|
||||
link_directories( /usr/local/lib)
|
||||
link_libraries(CppUTest CppUTestExt)
|
||||
add_executable(mesh_message_test
|
||||
|
||||
add_executable(mesh_message_test
|
||||
../../src/mesh/mesh_foundation.c
|
||||
../../src/mesh/mesh_node.c
|
||||
../../src/mesh/mesh_iv_index_seq_number.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user