1
0
mirror of https://github.com/rene-dev/stmbl.git synced 2024-12-21 16:12:18 +00:00
stmbl/qt_term/CMakeLists.txt

51 lines
1.4 KiB
CMake
Raw Permalink Normal View History

2016-02-07 18:27:04 +00:00
project(Servoterm)
2016-01-11 13:05:16 +00:00
cmake_minimum_required(VERSION 3.0)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
2016-02-07 18:27:04 +00:00
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../term/cmake/Modules/")
2016-01-11 13:05:16 +00:00
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
2016-01-21 01:40:10 +00:00
find_package(Qt5OpenGLExtensions REQUIRED)
2016-01-11 13:52:51 +00:00
find_package(Qt5SerialPort REQUIRED)
2016-01-11 13:05:16 +00:00
set(TERM_INC
include/mainwindow.hpp
2016-02-07 18:27:04 +00:00
include/glwidget.hpp
include/functiongraph.hpp
2016-01-11 13:05:16 +00:00
)
set(TERM_SRC
src/main.cpp
src/mainwindow.cpp
2016-02-07 18:27:04 +00:00
src/glwidget.cpp
src/functiongraph.cpp
2016-01-11 13:05:16 +00:00
)
set(TERM_UI
ui/mainwindow.ui
)
set(TERM_CONF
config
)
QT5_WRAP_UI(TERM_UI_INC ${TERM_UI})
2016-01-16 12:33:19 +00:00
if(APPLE)
2016-02-07 18:27:04 +00:00
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/../term/resources/stmbl.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${TERM_INC} ${TERM_SRC} ${TERM_UI_INC} ${CMAKE_CURRENT_SOURCE_DIR}/../term/resources/stmbl.icns)
2016-01-16 12:33:19 +00:00
else(APPLE)
add_executable(${PROJECT_NAME} ${TERM_INC} ${TERM_SRC} ${TERM_UI_INC})
endif(APPLE)
2016-02-07 18:27:04 +00:00
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
2016-01-11 13:05:16 +00:00
2016-02-07 18:27:04 +00:00
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:DEBUG>:-ggdb -O2>)
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:RELEASE>:-O3 -NDEBUG>)
2016-01-11 13:05:16 +00:00
2016-02-07 18:27:04 +00:00
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Widgets Qt5::OpenGLExtensions Qt5::SerialPort)