Files
RRJServer/LibServer/CMakeLists.txt
2026-01-26 18:47:57 +03:00

118 lines
4.5 KiB
CMake

project(Server LANGUAGES CXX)
common_info_for_project(Server)
add_library(Server SHARED
ServerLMS_global.h
serverlmswidget.cpp
serverlmswidget.h
serverlmswidget.ui
metatypes.cpp
metatypes.h
settings/dialogsettingstray.cpp
settings/dialogsettingstray.h
settings/dialogsettingstray.ui
settings/dialogcheckdb.cpp
settings/dialogcheckdb.h
settings/dialogcheckdb.ui
clienthandler/clienthandler.cpp
clienthandler/clienthandler.h
multithreadserver/multithreadserver.cpp
multithreadserver/multithreadserver.h
Data/typesDataServerClient.h
Data/Client.h
Data/PacketType.h
Data/StreamingVersionData.h
Data/usertype.h
Systems/assetsmanager.cpp
Systems/assetsmanager.h
Systems/recognizesystem.cpp
Systems/recognizesystem.h
Systems/updatecontroller.cpp
Systems/updatecontroller.h
Systems/commonclienthandler.cpp
Systems/commonclienthandler.h
Systems/logger.cpp
Systems/logger.h
Systems/Parsers/dataparser.cpp
Systems/Parsers/dataparser.h
Systems/Parsers/clientanswerparser.cpp
Systems/Parsers/clientanswerparser.h
Systems/Parsers/dbanswerparser.cpp
Systems/Parsers/dbanswerparser.h
Systems/Parsers/processparser.cpp
Systems/Parsers/processparser.h
Systems/Parsers/docsanswerparser.cpp
Systems/Parsers/docsanswerparser.h
Systems/processingsystem.cpp
Systems/processingsystem.h
Systems/sendsystem.cpp
Systems/sendsystem.h
Systems/tools.cpp
Systems/tools.h
Systems/chatsystem.cpp
Systems/chatsystem.h
Systems/fasthashcalculator.cpp
Systems/fasthashcalculator.h
Systems/docsupdater.cpp
Systems/docsupdater.h
providerdblms/providerdblms.cpp
providerdblms/providerdblms.h
cficontroller/cficontroller.cpp
cficontroller/cficontroller.h
cficontroller/cfiobject.cpp
cficontroller/cfiobject.h
Server.qrc
)
target_link_libraries(Server PRIVATE Qt5::Widgets)
target_link_libraries(Server PRIVATE Qt5::Network)
target_link_libraries(Server PRIVATE Qt5::Concurrent)
target_link_libraries(Server PRIVATE Qt5::Sql)
target_link_libraries(Server PRIVATE Qt5::Xml)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/clienthandler)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/multithreadserver)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/providerdblms)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/settings)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Data)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Systems)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Systems/Parsers)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cficontroller)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibDataBaseInterface)
if(PROJECT_TYPE_DEBUG)
target_link_directories(Server PUBLIC ${REPO_PATH}/BUILDS/Debug64/LibDataBaseInterface)
else()
target_link_directories(Server PUBLIC ${REPO_PATH}/BUILDS/Release64/LibDataBaseInterface)
endif()
target_link_libraries(Server PRIVATE libDataBaseInterface.dll)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/authorization)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/tasks)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/widgets)
target_include_directories(Server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../LibInstructorsAndTrainees/specialmessagebox)
if(PROJECT_TYPE_DEBUG)
target_link_directories(Server PUBLIC ${REPO_PATH}/BUILDS/Debug64/LibInstructorsAndTrainees)
else()
target_link_directories(Server PUBLIC ${REPO_PATH}/BUILDS/Release64/LibInstructorsAndTrainees)
endif()
target_link_libraries(Server PRIVATE libInstructorsAndTrainees.dll)
target_compile_definitions(Server PRIVATE SERVERLMS_LIBRARY)
if(PROJECT_TYPE_DEBUG)
add_custom_command(TARGET Server
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/Debug64/LibServer/libServer.dll
${REPO_PATH}/BUILDS/Debug64/ProgramServerMTD)
else()
add_custom_command(TARGET Server
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${REPO_PATH}/BUILDS/Release64/LibServer/libServer.dll
${REPO_PATH}/BUILDS/Release64/ProgramServerMTD)
endif()