diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-10 09:23:49 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-07-10 09:23:49 +0200 |
commit | d945dee5b039e9e2d51b36852ef58a812acab302 (patch) | |
tree | 3f7a977b67d2d51726b349088075b23da73592ad /ble/CMakeLists.txt | |
parent | 441cd0b11186d66493798551e1102eb246f1af9f (diff) | |
download | ble-toys-d945dee5b039e9e2d51b36852ef58a812acab302.tar.gz ble-toys-d945dee5b039e9e2d51b36852ef58a812acab302.tar.bz2 ble-toys-d945dee5b039e9e2d51b36852ef58a812acab302.tar.xz ble-toys-d945dee5b039e9e2d51b36852ef58a812acab302.zip |
o Some iOS experiments. Very WiP.ios
Diffstat (limited to 'ble/CMakeLists.txt')
-rw-r--r-- | ble/CMakeLists.txt | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/ble/CMakeLists.txt b/ble/CMakeLists.txt index 5f20a21..fef06c5 100644 --- a/ble/CMakeLists.txt +++ b/ble/CMakeLists.txt @@ -10,12 +10,43 @@ if(IS_LINUX) list(APPEND SOURCE_FILES LinuxBluetooth.cpp LinuxBluetooth.h) list(APPEND COMPILE_OPTIONS -DIS_LINUX) elseif(IS_APPLE) - list(APPEND SOURCE_FILES OsxBluetooth.mm OsxBluetooth.h) + list(APPEND SOURCE_FILES OsxBluetooth.mm OsxBluetooth.h OsxBluetoothImpl.h) list(APPEND COMPILE_OPTIONS -DIS_APPLE) + + find_library(CORE_BLUETOOTH_LIBRARY CoreBluetooth) + if (NOT CORE_BLUETOOTH_LIBRARY) + message(FATAL_ERROR "CoreBluetooth not found") + endif() + message(STATUS "CORE_BLUETOOTH_LIBRARY=${CORE_BLUETOOTH_LIBRARY}") +# list(APPEND INCLUDE_DIRECTORIES ${CORE_BLUETOOTH_LIBRARY}/Headers) +# list(APPEND LIBRARIES_LIST ${CORE_BLUETOOTH_LIBRARY}/CoreBluetooth) + list(APPEND LIBRARIES_LIST ${CORE_BLUETOOTH_LIBRARY}) + + find_library(IOBLUETOOTH_LIBRARY IOBluetooth) + if (NOT IOBLUETOOTH_LIBRARY) + message(FATAL_ERROR "IOBluetooth not found") + endif() + message(STATUS "IOBLUETOOTH_LIBRARY=${IOBLUETOOTH_LIBRARY}") +# list(APPEND INCLUDE_DIRECTORIES ${IOBLUETOOTH_LIBRARY}/Headers) +# list(APPEND LIBRARIES_LIST ${IOBLUETOOTH_LIBRARY}/IOBluetooth) + list(APPEND LIBRARIES_LIST ${IOBLUETOOTH_LIBRARY}) + + find_library(FOUNDATION_LIBRARY Foundation) + if (NOT FOUNDATION_LIBRARY) + message(FATAL_ERROR "Foundation not found") + endif() + message(STATUS "FOUNDATION_LIBRARY=${FOUNDATION_LIBRARY}") +# list(APPEND INCLUDE_DIRECTORIES ${FOUNDATION_LIBRARY}/Headers) +# list(APPEND LIBRARIES_LIST ${FOUNDATION_LIBRARY}/Foundation) + list(APPEND LIBRARIES_LIST ${FOUNDATION_LIBRARY}) endif() +list(APPEND INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include") + find_package(Boost COMPONENTS regex system program_options REQUIRED) +list(APPEND INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") + add_library(ble ${SOURCE_FILES}) -target_include_directories(ble PUBLIC "${PROJECT_SOURCE_DIR}/include") -target_include_directories(ble PUBLIC "${Boost_INCLUDE_DIRS}") +target_include_directories(ble PUBLIC "${Boost_INCLUDE_DIRS}" ${INCLUDE_DIRECTORIES}) target_compile_options(ble PRIVATE -Wno-deprecated-register ${COMPILE_OPTIONS}) +target_link_libraries(ble PUBLIC ${LIBRARIES_LIST}) |