Files
Rennbahn/CMakeLists.txt

61 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.1.0)
project(Rennbahn)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
message("Build type: RELEASE")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
# uncomment for ATMega based version (needs usb library)
#add_definitions(-DATMEGA)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Sql REQUIRED)
# Populate a CMake variable with the sources
set(helloworld_SRCS
main.cpp
mainwindow.cpp
windowrace.cpp
hardwaresetup.cpp
windowssettings.cpp
counter.cpp
countdown.cpp
ampel.cpp
database.cpp
windowrennliste.cpp
training.cpp
timemodel.cpp
qvectorhelper.cpp
resultmodel.cpp
result.cpp
evaluation.cpp
mainwindow.ui
windowrace.ui
windowssettings.ui
windowrennliste.ui
training.ui
result.ui
evaluation.ui
)
# Tell CMake to create the helloworld executable
add_executable(Rennbahn ${helloworld_SRCS})
# Use the Widgets module from Qt 5
target_link_libraries(Rennbahn Qt5::Widgets Qt5::Core Qt5::Sql)