cmake_minimum_required(VERSION 3.0)
project(lepton_sdk)

set(LEPTON_SDK_SOURCES
		dep/crc16fast.c
		dep/LEPTON_AGC.c
		dep/LEPTON_ErrorCodes.c
		dep/LEPTON_I2C_Protocol.c
		dep/LEPTON_I2C_Service.cpp
		dep/LEPTON_OEM.c
		dep/LEPTON_RAD.c
		dep/LEPTON_SDK.c
		dep/LEPTON_SYS.c
		dep/LEPTON_VID.c
		jni-i2c-interface.cpp
)
find_library(log-lib log)
add_library(lepton_sdk STATIC ${LEPTON_SDK_SOURCES})
set_target_properties(lepton_sdk PROPERTIES
		CXX_STANDARD 17
		CXX_EXTENSIONS OFF)
target_compile_options(lepton_sdk PRIVATE ${LEPTON_SDK_C_FLAGS})
target_link_libraries(lepton_sdk ${log-lib})
