Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SPDX-FileCopyrightText: 2023 Open Mobile Platform LLC <community@omp.ru>
- # SPDX-License-Identifier: BSD-3-Clause
- cmake_minimum_required (VERSION 3.1)
- project(HttpServer)
- include(GNUInstallDirs)
- find_package (Qt5 COMPONENTS Core Network Quick REQUIRED)
- set(SOURCES
- HttpServer/src/httpServer/httpConnection.cpp
- HttpServer/src/httpServer/httpRequest.cpp
- HttpServer/src/httpServer/httpRequestRouter.cpp
- HttpServer/src/httpServer/httpResponse.cpp
- HttpServer/src/httpServer/httpServer.cpp
- HttpServer/src/httpServer/util.cpp
- )
- set(HEADERS
- HttpServer/src/httpServer/httpConnection.h
- HttpServer/src/httpServer/httpCookie.h
- HttpServer/src/httpServer/httpRequest.h
- HttpServer/src/httpServer/httpRequestHandler.h
- HttpServer/src/httpServer/httpRequestRouter.h
- HttpServer/src/httpServer/httpResponse.h
- HttpServer/src/httpServer/httpServer.h
- HttpServer/src/httpServer/httpServerConfig.h
- HttpServer/src/httpServer/util.h
- )
- add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS})
- target_include_directories(${PROJECT_NAME}
- PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/HttpServer/src/httpServer>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
- )
- set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1)
- set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1)
- set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADERS}")
- add_compile_definitions(HTTPSERVER_LIBRARY)
- add_compile_definitions(QT_DEPRECATED_WARNINGS)
- target_link_libraries(${PROJECT_NAME}
- Qt5::Quick
- Qt5::Core
- z
- )
- install(TARGETS ${PROJECT_NAME}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement