diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-30 14:37:06 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-30 14:37:06 +0200 |
commit | 441cd0b11186d66493798551e1102eb246f1af9f (patch) | |
tree | 3cdb5b1dea6b782cbf59e172807f9dc15e7bd418 /ble/CMakeLists.txt | |
parent | af63bd5688731b57551ac161c0dad26a0b4557d7 (diff) | |
download | ble-toys-441cd0b11186d66493798551e1102eb246f1af9f.tar.gz ble-toys-441cd0b11186d66493798551e1102eb246f1af9f.tar.bz2 ble-toys-441cd0b11186d66493798551e1102eb246f1af9f.tar.xz ble-toys-441cd0b11186d66493798551e1102eb246f1af9f.zip |
Getting started on a port to OSX.
Diffstat (limited to 'ble/CMakeLists.txt')
-rw-r--r-- | ble/CMakeLists.txt | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/ble/CMakeLists.txt b/ble/CMakeLists.txt index 543e85d..5f20a21 100644 --- a/ble/CMakeLists.txt +++ b/ble/CMakeLists.txt @@ -1,4 +1,21 @@ -file(GLOB SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h) +list(APPEND SOURCE_FILES Bluetooth.cpp) +list(APPEND SOURCE_FILES BluetoothImpl.h) +list(APPEND SOURCE_FILES ByteBuffer.cpp) +list(APPEND SOURCE_FILES log.h) +list(APPEND SOURCE_FILES "${PROJECT_SOURCE_DIR}/include/ble/Bluetooth.h") +list(APPEND SOURCE_FILES "${PROJECT_SOURCE_DIR}/include/ble/ByteBuffer.h") + +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 COMPILE_OPTIONS -DIS_APPLE) +endif() + +find_package(Boost COMPONENTS regex system program_options REQUIRED) add_library(ble ${SOURCE_FILES}) -include_directories("${PROJECT_SOURCE_DIR}/include") +target_include_directories(ble PUBLIC "${PROJECT_SOURCE_DIR}/include") +target_include_directories(ble PUBLIC "${Boost_INCLUDE_DIRS}") +target_compile_options(ble PRIVATE -Wno-deprecated-register ${COMPILE_OPTIONS}) |