forked from xin/TowerOptoSifAndSpectral
机载第一版
This commit is contained in:
28
othersoft/GPSLog/project/CMakeLists.txt
Normal file
28
othersoft/GPSLog/project/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
project(GPSLog)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
# Qt 5.12 需要手动指定 Qt 模块
|
||||
set(QT_MODULES Core SerialPort)
|
||||
|
||||
find_package(Qt5 COMPONENTS ${QT_MODULES} REQUIRED)
|
||||
|
||||
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5SerialPort_INCLUDE_DIRS})
|
||||
include_directories("../src/Logger")
|
||||
|
||||
# Source files
|
||||
file(GLOB SOURCES "../src/*.cpp" "../src/*.h")
|
||||
|
||||
# Tell CMake to run moc when necessary
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
message(STATUS "SOURCES: ${SOURCES}")
|
||||
|
||||
add_executable(GPSLog ${SOURCES})
|
||||
|
||||
qt5_use_modules(GPSLog Core SerialPort)
|
||||
|
||||
target_link_libraries(GPSLog Qt5::Core Qt5::SerialPort)
|
||||
Reference in New Issue
Block a user