cmake_minimum_required(VERSION 3.0.2) project(oled_screen) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") find_package(Threads REQUIRED) include_directories( include ) add_executable(oled_screen src/main.cpp src/device.cpp src/driver.cpp) target_link_libraries(oled_screen -lbcm2835 -lm Threads::Threads)