cmake_minimum_required(VERSION 3.5)
project(ocean_optics_calibration_console)#ocean_optics_calibration_console

#编译32位的程序
#option(USE_32BITS "Compile for 32bits processors(linux only)" OFF)
#
#
#if(USE_32BITS)
#    message(STATUS "using 32bits")
#    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
#
#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
#else()
#endif(USE_32BITS)


set(CMAKE_CXX_STANDARD 14)

SET(CMAKE_INSTALL_PREFIX < /home/pi/bin >)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_PREFIX_PATH "/home/iris-xport/Qt5.9.0/5.9/gcc_64/")#tc_add: https://blog.csdn.net/aiyun5666/article/details/101915628
set(QT Core Network SerialPort)
set(TEMPLATE app)
set(TARGET ximeaImageRecorder)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5 REQUIRED ${QT})

#include_directories(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/include/)
#LINK_DIRECTORIES(/home/iris-xport/projects/ocean/seabreeze-3.0.11/SeaBreeze/lib/)
include_directories(/home/pi/SeaBrease/include/)
LINK_DIRECTORIES(/home/pi/SeaBrease/lib/)

include_directories(.)#包含头文件
include_directories(/usr/include/eigen3)#包含头文件，安装eigen：sudo apt-get install libeigen3-dev


file(GLOB_RECURSE SRC_h ./Header_Files/*.h)
file(GLOB_RECURSE SRC_CPP ./Source_Files/*.cpp)

add_executable(${CMAKE_PROJECT_NAME} ${SRC_h} ${SRC_CPP})


qt5_use_modules(${CMAKE_PROJECT_NAME} ${QT})

TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME}
        seabreeze
        usb
        )
