2018-07-14 14:03:35 +02:00
|
|
|
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)
|
|
|
|
|
2018-08-07 16:06:01 +02:00
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
|
2018-07-14 14:03:35 +02:00
|
|
|
# Find the QtWidgets library
|
|
|
|
find_package(Qt5Widgets CONFIG REQUIRED)
|
2018-07-31 16:15:48 +02:00
|
|
|
find_package(Qt5PrintSupport CONFIG REQUIRED)
|
2018-07-06 10:54:22 +02:00
|
|
|
|
|
|
|
set(GUI_SOURCES
|
|
|
|
kima2.cpp
|
2018-07-14 14:03:35 +02:00
|
|
|
mainwindow.cpp
|
2018-07-21 21:18:22 +02:00
|
|
|
mainwindow.ui
|
2018-07-16 12:00:17 +02:00
|
|
|
sellerdialog.cpp
|
2018-07-21 21:18:22 +02:00
|
|
|
sellerdialog.ui
|
2018-07-16 12:00:17 +02:00
|
|
|
sellermodel.cpp
|
2018-07-21 19:24:56 +02:00
|
|
|
pricedialog.cpp
|
2018-07-21 21:18:22 +02:00
|
|
|
pricedialog.ui
|
2018-07-22 20:10:22 +02:00
|
|
|
basketmodel.cpp
|
2018-07-25 16:04:45 +02:00
|
|
|
salemodel.cpp
|
2018-07-30 09:50:54 +02:00
|
|
|
reportdialog.cpp
|
|
|
|
reportdialog.ui
|
|
|
|
reportmodel.cpp
|
2018-07-30 13:40:58 +02:00
|
|
|
settingsdialog.cpp
|
|
|
|
settingsdialog.ui
|
2018-08-07 16:06:01 +02:00
|
|
|
../../kima2.qrc
|
2018-07-06 10:54:22 +02:00
|
|
|
)
|
|
|
|
|
2018-08-09 14:14:25 +02:00
|
|
|
add_executable(kima2 ${GUI_SOURCES} kima2.rc)
|
2018-07-30 16:39:33 +02:00
|
|
|
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
|
2018-08-06 09:59:06 +02:00
|
|
|
target_link_libraries(kima2 core printer Qt5::Widgets Qt5::PrintSupport stdc++fs)
|
2018-08-03 11:33:23 +02:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(kima2 PROPERTIES LINK_FLAGS "-mwindows")
|
|
|
|
endif(WIN32)
|
|
|
|
|
2018-08-07 12:52:24 +02:00
|
|
|
# CPack
|
|
|
|
install(TARGETS kima2 RUNTIME DESTINATION bin)
|
|
|
|
|