cmake_minimum_required(VERSION 2.8.11)

project(wiringPi)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})


ADD_DEFINITIONS( "-D_GNU_SOURCE -Wformat=2 -Wall -Winline -I. -pipe -fPIC")

file(
	GLOB_RECURSE
	source_files
	wiringPi.c
	wiringSerial.c
	wiringShift.c
	piHiPri.c
	piThread.c
	wiringPiSPI.c
	wiringPiI2C.c
	softTone.c
	softPwm.c
	mcp23008.c
	mcp23016.c
	mcp23017.c
	mcp23s08.c
	mcp23s17.c
	sr595.c
	pcf8574.c
	pcf8591.c
	mcp3002.c
	mcp3004.c
	mcp4802.c
	mcp3422.c
	max31855.c
	max5322.c
	sn3218.c
	drcSerial.c
	wpiExtensions.c
)

add_library(
        wiringPi
        STATIC
        ${source_files}
)

target_link_libraries (wiringPi
	LINK_PUBLIC
	pthread)
