mirror of https://github.com/labapart/gattlib
explicitly link to pthread and libpcre in examples
- omitting this causes linker errors when cross-compilingpull/37/merge
parent
a370ea5f02
commit
647f3d3c10
|
@ -24,8 +24,9 @@ cmake_minimum_required(VERSION 2.6)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
set(ble_scan_SRCS ble_scan.c)
|
||||
|
||||
add_executable(ble_scan ${ble_scan_SRCS})
|
||||
target_link_libraries(ble_scan ${GATTLIB_LDFLAGS} pthread)
|
||||
target_link_libraries(ble_scan ${GATTLIB_LDFLAGS} ${PCRE_LIBRARIES} pthread)
|
||||
|
|
|
@ -24,8 +24,9 @@ cmake_minimum_required(VERSION 2.6)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
set(discover_SRCS discover.c)
|
||||
|
||||
add_executable(discover ${discover_SRCS})
|
||||
target_link_libraries(discover ${GATTLIB_LDFLAGS} pthread)
|
||||
target_link_libraries(discover ${GATTLIB_LDFLAGS} ${PCRE_LIBRARIES} pthread)
|
||||
|
|
|
@ -25,6 +25,7 @@ find_package(PkgConfig REQUIRED)
|
|||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
include_directories(${GLIB_INCLUDE_DIRS})
|
||||
|
||||
|
@ -51,4 +52,4 @@ endif()
|
|||
set(gatttool_SRCS gatttool.c interactive.c utils.c)
|
||||
|
||||
add_executable(gatttool ${gatttool_SRCS})
|
||||
target_link_libraries(gatttool ${GATTLIB_LDFLAGS} ${GLIB_LDFLAGS} readline pthread)
|
||||
target_link_libraries(gatttool ${GATTLIB_LDFLAGS} ${GLIB_LDFLAGS} ${PCRE_LIBRARIES} readline tinfo pthread)
|
||||
|
|
|
@ -25,8 +25,9 @@ cmake_minimum_required(VERSION 2.6)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
set(nordic_uart_SRCS nordic_uart.c)
|
||||
|
||||
add_executable(nordic_uart ${nordic_uart_SRCS})
|
||||
target_link_libraries(nordic_uart ${GATTLIB_LDFLAGS} pthread)
|
||||
target_link_libraries(nordic_uart ${GATTLIB_LDFLAGS} ${PCRE_LIBRARIES} pthread)
|
||||
|
|
|
@ -26,9 +26,10 @@ find_package(PkgConfig REQUIRED)
|
|||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
include_directories(${GLIB_INCLUDE_DIRS})
|
||||
set(notification_SRCS notification.c)
|
||||
|
||||
add_executable(notification ${notification_SRCS})
|
||||
target_link_libraries(notification ${GATTLIB_LDFLAGS} ${GLIB_LDFLAGS} pthread)
|
||||
target_link_libraries(notification ${GATTLIB_LDFLAGS} ${GLIB_LDFLAGS} ${PCRE_LIBRARIES} pthread)
|
||||
|
|
|
@ -25,8 +25,9 @@ cmake_minimum_required(VERSION 2.6)
|
|||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_search_module(GATTLIB REQUIRED gattlib)
|
||||
pkg_search_module(PCRE REQUIRED libpcre)
|
||||
|
||||
set(read_write_SRCS read_write.c)
|
||||
|
||||
add_executable(read_write ${read_write_SRCS})
|
||||
target_link_libraries(read_write ${GATTLIB_LDFLAGS} pthread)
|
||||
target_link_libraries(read_write ${GATTLIB_LDFLAGS} ${PCRE_LIBRARIES} pthread)
|
||||
|
|
Loading…
Reference in New Issue