kima2/src/gui/CMakeLists.txt

42 lines
997 B
CMake

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)
set(CMAKE_AUTORCC ON)
# Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5PrintSupport CONFIG REQUIRED)
set(GUI_SOURCES
kima2.cpp
mainwindow.cpp
mainwindow.ui
sellerdialog.cpp
sellerdialog.ui
sellermodel.cpp
pricedialog.cpp
pricedialog.ui
basketmodel.cpp
salemodel.cpp
reportdialog.cpp
reportdialog.ui
reportmodel.cpp
settingsdialog.cpp
settingsdialog.ui
../../kima2.qrc
)
add_executable(kima2 ${GUI_SOURCES} kima2.rc)
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
target_link_libraries(kima2 core printer Qt5::Widgets Qt5::PrintSupport stdc++fs)
if(WIN32)
set_target_properties(kima2 PROPERTIES LINK_FLAGS "-mwindows")
endif(WIN32)
# CPack
install(TARGETS kima2 RUNTIME DESTINATION bin)