# CMakeList.txt: 顶层 CMake 项目文件，在此处执行全局配置
# 并包含子项目。
#
cmake_minimum_required (VERSION 3.8)

project ("IRIS_FODIS")

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(QT Core SerialPort)
set(CMAKE_CXX_STANDARD 14)

find_package(Qt5 REQUIRED ${QT})

file(GLOB_RECURSE HDR_LIST "Source/*.h")
file(GLOB_RECURSE SRC_LIST "Source/*.cpp")  

include_directories("Source")
include_directories("Source/FS")
include_directories("Source/OSIF/include")
include_directories("Source/ZZ_SDK")

link_directories("source/OSIF/DLib")
link_directories("/home/pi/SeaBrease/lib")

add_executable( IRIS_FODIS
      main.cpp
	${HDR_LIST} 
	${SRC_LIST} 
)

IF (WIN32)
target_link_libraries(IRIS_FODIS SeaBreeze)
ELSE ()
target_link_libraries(IRIS_FODIS seabreeze usb stdc++ m)
ENDIF ()

qt5_use_modules(IRIS_FODIS ${QT})
set_target_properties(IRIS_FODIS PROPERTIES AUTOMOC ON)

# 包含子项目。
#add_subdirectory ("IRIS_FODIS")
