cmake_minimum_required(VERSION 2.8.4) project(ble_toys) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED OFF) set(Boost_USE_STATIC_RUNTIME OFF) add_definitions(-DBOOST_ALL_DYN_LINK) find_package(Boost REQUIRED COMPONENTS system log thread) set(SOURCE_FILES main.cpp Bluetooth.cpp LinuxBluetooth.cpp) add_executable(ble_toys ${SOURCE_FILES}) target_link_libraries(ble_toys bluetooth) target_link_libraries(ble_toys pthread) target_link_libraries(ble_toys ${Boost_LIBRARIES})