project(ProgramServerMPS LANGUAGES CXX) common_info_for_project(ProgramServerMPS) # Подключаем RC-файл (только для Windows) if(WIN32) # Предполагая, что файл app.rc расположен в корневом каталоге проекта set(RC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/app.rc) endif() add_executable(ServerMPS WIN32 main.cpp mainwindow.cpp mainwindow.h mainwindow.ui ProgramServerMPS.qrc ) # Подключаем RC-файл к цели if(RC_FILE) target_sources(ServerMPS PRIVATE ${RC_FILE}) endif() target_link_libraries(ServerMPS PRIVATE Qt5::Widgets) target_link_libraries(ServerMPS PRIVATE Qt5::Network) target_link_libraries(ServerMPS PRIVATE Qt5::Sql) target_link_libraries(ServerMPS PRIVATE Qt5::Xml) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibDataBaseInterface) if(PROJECT_TYPE_DEBUG) target_link_directories(ServerMPS PUBLIC ${REPO_PATH}/BUILDS/Debug64/LibDataBaseInterface) else() target_link_directories(ServerMPS PUBLIC ${REPO_PATH}/BUILDS/Release64/LibDataBaseInterface) endif() target_link_libraries(ServerMPS PRIVATE libDataBaseInterface.dll) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibServer) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibServer/clienthandler) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibServer/multithreadserver) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibServer/providerdblms) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibServer/Systems) if(PROJECT_TYPE_DEBUG) target_link_directories(ServerMPS PUBLIC ${REPO_PATH}/BUILDS/Debug64/LibServer) else() target_link_directories(ServerMPS PUBLIC ${REPO_PATH}/BUILDS/Release64/LibServer) endif() target_link_libraries(ServerMPS PRIVATE libServer.dll) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/tasks) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/widgets) target_include_directories(ServerMPS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/specialmessagebox)