mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 18:40:31 +00:00
port: avoid duplicate library warning for CMake
This commit is contained in:
parent
e8b7768f43
commit
57f681c0f6
@ -7,33 +7,6 @@ project(BTstack-libusb)
|
||||
|
||||
SET(BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../..)
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
|
||||
# libusb
|
||||
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||
include_directories(${LIBUSB_INCLUDE_DIRS})
|
||||
link_directories(${LIBUSB_LIBRARY_DIRS})
|
||||
link_libraries(${LIBUSB_LIBRARIES})
|
||||
|
||||
|
||||
# portaudio
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
|
||||
# pthread
|
||||
find_package(Threads)
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
|
||||
# extra compiler warnings
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
||||
# using Clang
|
||||
@ -165,6 +138,31 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
# libusb
|
||||
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||
include_directories(${LIBUSB_INCLUDE_DIRS})
|
||||
link_directories(${LIBUSB_LIBRARY_DIRS})
|
||||
link_libraries(${LIBUSB_LIBRARIES})
|
||||
|
||||
# portaudio
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
|
||||
# pthread
|
||||
find_package(Threads)
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
|
||||
# create targets for all examples
|
||||
file(GLOB EXAMPLES_C "../../example/*.c")
|
||||
list(SORT EXAMPLES_C)
|
||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -145,6 +129,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Add BCM Support
|
||||
include(${BTSTACK_ROOT}/chipset/bcm/bcm.cmake)
|
||||
|
||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO QUIET portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -145,6 +129,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO QUIET portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Add NXP Support
|
||||
include(${BTSTACK_ROOT}/chipset/nxp/nxp.cmake)
|
||||
|
||||
|
@ -7,25 +7,6 @@ project(BTstack-posix-h4-zephyr)
|
||||
|
||||
SET(BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../..)
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# pthread
|
||||
find_package(Threads)
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
# extra compiler warnings
|
||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
||||
@ -94,6 +75,27 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# pthread
|
||||
find_package(Threads)
|
||||
link_libraries(${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
|
||||
# get list of examples
|
||||
include(../../example/CMakeLists.txt)
|
||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
@ -166,6 +151,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Add CC256x Support and specify init script
|
||||
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
||||
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -85,6 +69,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get list of examples, skipping mesh_node_demo
|
||||
include(../../example/CMakeLists.txt)
|
||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
@ -85,6 +69,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get list of examples, skipping mesh_node_demo
|
||||
include(../../example/CMakeLists.txt)
|
||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
@ -167,6 +152,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# Add CC256x Support and specify init script
|
||||
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
||||
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Generate .h from .gatt files
|
||||
find_package (Python COMPONENTS Interpreter)
|
||||
@ -101,6 +86,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get list of examples, skipping mesh_node_demo
|
||||
include(../../example/CMakeLists.txt)
|
||||
set (EXAMPLES ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE})
|
||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||
# using Visual Studio C++
|
||||
endif()
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# to generate .h from .gatt files
|
||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||
@ -73,8 +58,6 @@ file(GLOB SOURCES_YXML "../../3rd-party/yxml/yxml.c")
|
||||
file(GLOB SOURCES_BLE_OFF "../../src/ble/le_device_db_memory.c")
|
||||
list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF})
|
||||
|
||||
|
||||
|
||||
set(SOURCES
|
||||
${SOURCES_BLE}
|
||||
${SOURCES_BLUEDROID}
|
||||
@ -95,6 +78,23 @@ list(SORT SOURCES)
|
||||
# create static lib
|
||||
add_library(btstack STATIC ${SOURCES})
|
||||
|
||||
# pkgconfig
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
# portaudio
|
||||
if (PkgConfig_FOUND)
|
||||
pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
|
||||
if(PORTAUDIO_FOUND)
|
||||
message("HAVE_PORTAUDIO")
|
||||
include_directories(${PORTAUDIO_INCLUDE_DIRS})
|
||||
link_directories(${PORTAUDIO_LIBRARY_DIRS})
|
||||
link_libraries(${PORTAUDIO_LIBRARIES})
|
||||
# CMake 3.12 - add_compile_definitions(HAVE_PORTAUDIO)
|
||||
SET(CMAKE_C_FLAGS "-DHAVE_PORTAUDIO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# get list of examples, skipping mesh_node_demo
|
||||
include(../../example/CMakeLists.txt)
|
||||
set (EXAMPLES ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE})
|
||||
|
Loading…
x
Reference in New Issue
Block a user