Refactor CMakeLists

Closes #2471
Closes #1816
This commit is contained in:
Mohammad Nejati
2024-11-20 19:54:25 +00:00
committed by Mohammad Nejati
parent a21250d12d
commit 75e45287fb
82 changed files with 916 additions and 1359 deletions

View File

@ -1,5 +1,6 @@
#
# Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
# Copyright (c) 2024 Mohammad Nejati
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -7,6 +8,9 @@
# Official repository: https://github.com/boostorg/beast
#
add_subdirectory (server)
add_subdirectory (server-flex)
add_subdirectory (server-flex-awaitable)
add_subdirectory(server)
if (OPENSSL_FOUND)
add_subdirectory(server-flex)
add_subdirectory(server-flex-awaitable)
endif ()

View File

@ -1,5 +1,6 @@
#
# Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
# Copyright (c) 2024 Mohammad Nejati
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -7,25 +8,15 @@
# Official repository: https://github.com/boostorg/beast
#
if (OPENSSL_FOUND)
GroupSources(include/boost/beast beast)
GroupSources(example/common common)
GroupSources(example/advanced/server-flex-awaitable "/")
add_executable(advanced-server-flex-awaitable
Jamfile
advanced_server_flex_awaitable.cpp)
add_executable (advanced-server-flex-awaitable
${BOOST_BEAST_FILES}
${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp
Jamfile
advanced_server_flex_awaitable.cpp
)
target_include_directories(advanced-server-flex-awaitable
PRIVATE ${PROJECT_SOURCE_DIR})
set_property(TARGET advanced-server-flex-awaitable PROPERTY FOLDER "example-advanced-server")
target_link_libraries (advanced-server-flex-awaitable
OpenSSL::SSL OpenSSL::Crypto
lib-asio
lib-asio-ssl
lib-beast
)
target_link_libraries(advanced-server-flex-awaitable
PRIVATE Boost::beast Boost::scope OpenSSL::SSL OpenSSL::Crypto)
endif()
set_target_properties(advanced-server-flex-awaitable
PROPERTIES FOLDER "example-advanced-server")

View File

@ -1,5 +1,6 @@
#
# Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
# Copyright (c) 2024 Mohammad Nejati
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -7,25 +8,15 @@
# Official repository: https://github.com/boostorg/beast
#
if (OPENSSL_FOUND)
GroupSources(include/boost/beast beast)
GroupSources(example/common common)
GroupSources(example/advanced/server-flex "/")
add_executable(advanced-server-flex
Jamfile
advanced_server_flex.cpp)
add_executable (advanced-server-flex
${BOOST_BEAST_FILES}
${PROJECT_SOURCE_DIR}/example/common/server_certificate.hpp
Jamfile
advanced_server_flex.cpp
)
target_include_directories(advanced-server-flex
PRIVATE ${PROJECT_SOURCE_DIR})
set_property(TARGET advanced-server-flex PROPERTY FOLDER "example-advanced-server")
target_link_libraries (advanced-server-flex
OpenSSL::SSL OpenSSL::Crypto
lib-asio
lib-asio-ssl
lib-beast
)
target_link_libraries(advanced-server-flex
PRIVATE Boost::beast OpenSSL::SSL OpenSSL::Crypto)
endif()
set_target_properties(advanced-server-flex
PROPERTIES FOLDER "example-advanced-server")

View File

@ -1,5 +1,6 @@
#
# Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
# Copyright (c) 2024 Mohammad Nejati
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -7,17 +8,10 @@
# Official repository: https://github.com/boostorg/beast
#
GroupSources(include/boost/beast beast)
GroupSources(example/advanced/server "/")
add_executable (advanced-server
${BOOST_BEAST_FILES}
add_executable(advanced-server
Jamfile
advanced_server.cpp
)
advanced_server.cpp)
target_link_libraries(advanced-server
lib-asio
lib-beast)
target_link_libraries(advanced-server PRIVATE Boost::beast)
set_property(TARGET advanced-server PROPERTY FOLDER "example-advanced-server")
set_target_properties(advanced-server PROPERTIES FOLDER "example-advanced-server")