added cmake

This commit is contained in:
2018-11-30 11:19:50 +01:00
parent 551e6bbede
commit db016a5f2a

40
CMakeLists.txt Normal file
View File

@@ -0,0 +1,40 @@
cmake_minimum_required(VERSION 3.1.0)
project(Rennbahn)
# 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)
# 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
mainwindow.ui
windowrace.ui
windowssettings.ui
windowrennliste.ui
training.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)