cmake_minimum_required(VERSION 3.0 FATAL_ERROR)

# This is the name of the project
project(lightdemo1 LANGUAGES CXX)

# This defines system level include directories, where headers for system libraries are defined.
include_directories(SYSTEM /rpi_sysroot/usr/include /rpi_sysroot/usr/local/include)

# This provides additional compile options.
add_definitions(-Wall -g -O0 -L/rpi_sysroot/usr/lib -L/rpi_sysroot/usrlocal//lib -lwiringPi -lpthread)

# This identifies the source code files that are relevant to the project.
file(GLOB SOURCES "*.cpp")

# This defines that an executable is to be created.
add_executable(lightdemo1 ${SOURCES})

# This defines the libraries which are needed by this project for it to link properly.
target_link_libraries(lightdemo1 PUBLIC wiringPi pthread rt)



