Files
RRJServer/TrayServerLMS/CMakeLists.txt

53 lines
2.3 KiB
CMake

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