kima2/src/gui/CMakeLists.txt

51 lines
1.5 KiB
CMake
Raw Normal View History

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
2019-04-10 12:04:18 +02:00
# For SingleApplication:
find_package(Qt5Network CONFIG REQUIRED)
set(QAPPLICATION_CLASS QApplication)
add_compile_definitions(QAPPLICATION_CLASS=${QAPPLICATION_CLASS})
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
${PROJECT_SOURCE_DIR}/subprojects/singleapplication/singleapplication.git/singleapplication.cpp
${PROJECT_SOURCE_DIR}/subprojects/singleapplication/singleapplication.git/singleapplication_p.cpp
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})
target_include_directories(kima2 PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/singleapplication/singleapplication.git)
2019-04-10 12:04:18 +02:00
target_link_libraries(kima2 core printer Qt5::Widgets Qt5::PrintSupport Qt5::Network 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)