mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
104 lines
2.9 KiB
CMake
104 lines
2.9 KiB
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
project(ServerLMS LANGUAGES CXX)
|
|
|
|
get_filename_component(REPO_PATH ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
set(PROJECT_TYPE_DEBUG TRUE)
|
|
endif()
|
|
|
|
if(PROJECT_TYPE_DEBUG)
|
|
add_definitions(-DPROJECT_TYPE_DEBUG)
|
|
endif()
|
|
|
|
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
|
find_package(Qt5 COMPONENTS Network REQUIRED)
|
|
find_package(Qt5 COMPONENTS Sql REQUIRED)
|
|
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
|
|
find_package(Qt5 REQUIRED COMPONENTS Concurrent)
|
|
find_package(Qt5 COMPONENTS Xml REQUIRED)
|
|
|
|
|
|
add_library(ServerLMS SHARED
|
|
ServerLMS_global.h
|
|
serverlmswidget.cpp
|
|
serverlmswidget.h
|
|
serverlmswidget.ui
|
|
clienthandler.cpp
|
|
clienthandler.h
|
|
multithreadserver.cpp
|
|
multithreadserver.h
|
|
Data/typesDataServerClient.h
|
|
Data/Client.h
|
|
Data/PacketType.h
|
|
Data/StreamingVersionData.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/processingsystem.cpp
|
|
Systems/processingsystem.h
|
|
Systems/sendsystem.cpp
|
|
Systems/sendsystem.h
|
|
Systems/tools.cpp
|
|
Systems/tools.h
|
|
providerdblms.cpp
|
|
providerdblms.h
|
|
resources.qrc
|
|
)
|
|
|
|
target_link_libraries(ServerLMS PRIVATE Qt5::Widgets)
|
|
target_link_libraries(ServerLMS PRIVATE Qt5::Network)
|
|
target_link_libraries(ServerLMS PRIVATE Qt5::Concurrent)
|
|
target_link_libraries(ServerLMS PRIVATE Qt5::Sql)
|
|
target_link_libraries(ServerLMS PRIVATE Qt5::Xml)
|
|
|
|
|
|
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../DataBaseLMS)
|
|
if(PROJECT_TYPE_DEBUG)
|
|
target_link_directories(ServerLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/DataBaseLMS)
|
|
elseif()
|
|
target_link_directories(ServerLMS PUBLIC ${REPO_PATH}/BUILDS/Release64/DataBaseLMS)
|
|
endif()
|
|
target_link_libraries(ServerLMS PRIVATE libDataBaseLMS.dll)
|
|
|
|
|
|
target_compile_definitions(ServerLMS PRIVATE SERVERLMS_LIBRARY)
|
|
|
|
|
|
if(PROJECT_TYPE_DEBUG)
|
|
add_custom_command(TARGET ServerLMS
|
|
POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${REPO_PATH}/BUILDS/Debug64/ServerLMS/libServerLMS.dll
|
|
${REPO_PATH}/BUILDS/Debug64/TestServerLMS)
|
|
elseif()
|
|
add_custom_command(TARGET ServerLMS
|
|
POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${REPO_PATH}/BUILDS/Release64/ServerLMS/libServerLMS.dll
|
|
${REPO_PATH}/BUILDS/Release64/TestServerLMS)
|
|
endif()
|