projects/aports·blob master · refs

45 lines · 1.7 KiB

1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index c7fa1dd..0163b8a 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -21,15 +21,8 @@ set(pebble_le_SOURCES
6 src/util.cpp)
7
8 # Third-Party Dependencies
9-add_subdirectory(third_party/SimpleBLE/simpleble EXCLUDE_FROM_ALL)
10 add_subdirectory(third_party/binc/binc)
11
12-set(SimpleBLE_INCLUDE_DIRS
13- ${CMAKE_SOURCE_DIR}/third_party/SimpleBLE/simpleble/include
14- ${CMAKE_SOURCE_DIR}/third_party/SimpleBLE/simplebluez/include
15- ${CMAKE_SOURCE_DIR}/third_party/SimpleBLE/simpledbus/include
16- ${CMAKE_BINARY_DIR}/third_party/SimpleBLE/simpleble/export)
17-
18 set(Binc_INCLUDE_DIRS
19 ${CMAKE_SOURCE_DIR}/third_party/binc)
20
21@@ -37,6 +30,8 @@ find_package(PkgConfig REQUIRED)
22 pkg_search_module(GLIB REQUIRED glib-2.0)
23 pkg_search_module(GIO REQUIRED gio-2.0)
24 pkg_search_module(DBus1 REQUIRED dbus-1)
25+pkg_search_module(SimpleBLE REQUIRED simpleble)
26+pkg_search_module(SimpleBLUEZ REQUIRED simplebluez)
27
28 # libpebble-le
29 add_library(pebble-le_o OBJECT ${pebble_le_SOURCES})
30@@ -54,12 +49,13 @@ set_target_properties(pebble-le PROPERTIES
31 set_target_properties(pebble-le_static PROPERTIES
32 OUTPUT_NAME pebble-le)
33
34-target_include_directories(pebble-le_o PRIVATE ${Binc_INCLUDE_DIRS} ${SimpleBLE_INCLUDE_DIRS} ${DBus1_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
35+target_include_directories(pebble-le_o PRIVATE ${Binc_INCLUDE_DIRS} ${SimpleBLE_INCLUDE_DIRS} ${SimpleBLUEZ_INCLUDE_DIRS} ${DBus1_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
36 target_include_directories(pebble-le_o PUBLIC include ${CMAKE_BINARY_DIR}/exports)
37
38 target_link_libraries(pebble-le_o PUBLIC
39 Binc
40- simpleble
41+ ${SimpleBLE_LIBRARIES}
42+ ${SimpleBLUEZ_LIBRARIES}
43 ${DBus1_LIBRARIES}
44 ${GLIB_LIBRARIES}
45 ${GIO_LIBRARIES})