mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-22 06:41:17 +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}/../..)
|
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
|
# extra compiler warnings
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
||||||
# using Clang
|
# using Clang
|
||||||
@ -165,6 +138,31 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# create targets for all examples
|
||||||
file(GLOB EXAMPLES_C "../../example/*.c")
|
file(GLOB EXAMPLES_C "../../example/*.c")
|
||||||
list(SORT EXAMPLES_C)
|
list(SORT EXAMPLES_C)
|
||||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
@ -145,6 +129,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# Add BCM Support
|
||||||
include(${BTSTACK_ROOT}/chipset/bcm/bcm.cmake)
|
include(${BTSTACK_ROOT}/chipset/bcm/bcm.cmake)
|
||||||
|
|
||||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
@ -145,6 +129,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# Add NXP Support
|
||||||
include(${BTSTACK_ROOT}/chipset/nxp/nxp.cmake)
|
include(${BTSTACK_ROOT}/chipset/nxp/nxp.cmake)
|
||||||
|
|
||||||
|
@ -7,25 +7,6 @@ project(BTstack-posix-h4-zephyr)
|
|||||||
|
|
||||||
SET(BTSTACK_ROOT ${CMAKE_SOURCE_DIR}/../..)
|
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
|
# extra compiler warnings
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*")
|
||||||
@ -94,6 +75,27 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# get list of examples
|
||||||
include(../../example/CMakeLists.txt)
|
include(../../example/CMakeLists.txt)
|
||||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
@ -166,6 +151,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# Add CC256x Support and specify init script
|
||||||
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
||||||
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
||||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
@ -85,6 +69,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# get list of examples, skipping mesh_node_demo
|
||||||
include(../../example/CMakeLists.txt)
|
include(../../example/CMakeLists.txt)
|
||||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||||
|
@ -17,22 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
@ -85,6 +69,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# get list of examples, skipping mesh_node_demo
|
||||||
include(../../example/CMakeLists.txt)
|
include(../../example/CMakeLists.txt)
|
||||||
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
set (EXAMPLES ${EXAMPLES_LE_ONLY} ${EXAMPLES_GENERAL})
|
||||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
find_package (Python REQUIRED COMPONENTS Interpreter)
|
||||||
@ -167,6 +152,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# Add CC256x Support and specify init script
|
||||||
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
set (CC256X_INIT_SCRIPT bluetooth_init_cc2564C_1.5.c)
|
||||||
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
include(${BTSTACK_ROOT}/chipset/cc256x/cc256x.cmake)
|
||||||
|
@ -17,21 +17,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
# using Visual Studio C++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# Generate .h from .gatt files
|
||||||
find_package (Python COMPONENTS Interpreter)
|
find_package (Python COMPONENTS Interpreter)
|
||||||
@ -101,6 +86,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# get list of examples, skipping mesh_node_demo
|
||||||
include(../../example/CMakeLists.txt)
|
include(../../example/CMakeLists.txt)
|
||||||
set (EXAMPLES ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE})
|
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++
|
# using Visual Studio C++
|
||||||
endif()
|
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
|
# to generate .h from .gatt files
|
||||||
find_package (Python REQUIRED COMPONENTS Interpreter)
|
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")
|
file(GLOB SOURCES_BLE_OFF "../../src/ble/le_device_db_memory.c")
|
||||||
list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF})
|
list(REMOVE_ITEM SOURCES_BLE ${SOURCES_BLE_OFF})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
${SOURCES_BLE}
|
${SOURCES_BLE}
|
||||||
${SOURCES_BLUEDROID}
|
${SOURCES_BLUEDROID}
|
||||||
@ -95,6 +78,23 @@ list(SORT SOURCES)
|
|||||||
# create static lib
|
# create static lib
|
||||||
add_library(btstack STATIC ${SOURCES})
|
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
|
# get list of examples, skipping mesh_node_demo
|
||||||
include(../../example/CMakeLists.txt)
|
include(../../example/CMakeLists.txt)
|
||||||
set (EXAMPLES ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE})
|
set (EXAMPLES ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user