|
7 | 7 | # Official repository: https://github.com/cppalliance/beast2 |
8 | 8 | # |
9 | 9 |
|
10 | | -if (CMAKE_CXX_STANDARD EQUAL 20) |
11 | | - file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp |
12 | | - CMakeLists.txt |
13 | | - Jamfile) |
| 10 | +file(GLOB_RECURSE PFILES CONFIGURE_DEPENDS *.cpp *.hpp |
| 11 | + CMakeLists.txt |
| 12 | + Jamfile) |
14 | 13 |
|
15 | | - source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) |
| 14 | +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "" FILES ${PFILES}) |
16 | 15 |
|
17 | | - add_executable(beast2_example_client_burl ${PFILES}) |
| 16 | +add_executable(beast2_example_client_burl ${PFILES}) |
18 | 17 |
|
19 | | - target_compile_definitions(beast2_example_client_burl |
20 | | - PRIVATE BOOST_ASIO_NO_DEPRECATED) |
| 18 | +target_compile_definitions(beast2_example_client_burl |
| 19 | + PRIVATE BOOST_ASIO_NO_DEPRECATED) |
21 | 20 |
|
22 | | - set_property(TARGET beast2_example_client_burl |
23 | | - PROPERTY FOLDER "examples") |
| 21 | +set_property(TARGET beast2_example_client_burl |
| 22 | + PROPERTY FOLDER "examples") |
24 | 23 |
|
25 | | - find_package(OpenSSL REQUIRED) |
| 24 | +find_package(OpenSSL REQUIRED) |
26 | 25 |
|
27 | | - target_link_libraries(beast2_example_client_burl |
28 | | - Boost::beast2 |
29 | | - Boost::url |
30 | | - Boost::program_options |
31 | | - Boost::scope |
32 | | - OpenSSL::SSL |
33 | | - OpenSSL::Crypto) |
| 26 | +target_compile_features(beast2_example_client_burl PUBLIC cxx_std_20) |
34 | 27 |
|
35 | | - if (WIN32) |
36 | | - target_link_libraries(beast2_example_client_burl crypt32) |
37 | | - endif() |
| 28 | +target_link_libraries(beast2_example_client_burl |
| 29 | + Boost::beast2 |
| 30 | + Boost::url |
| 31 | + Boost::program_options |
| 32 | + Boost::scope |
| 33 | + OpenSSL::SSL |
| 34 | + OpenSSL::Crypto) |
38 | 35 |
|
39 | | - if (TARGET Boost::capy_zlib) |
40 | | - target_link_libraries(beast2_example_client_burl Boost::capy_zlib) |
41 | | - endif() |
42 | | - |
43 | | - if (TARGET Boost::capy_brotli) |
44 | | - target_link_libraries(beast2_example_client_burl Boost::capy_brotli) |
45 | | - endif() |
| 36 | +if (WIN32) |
| 37 | + target_link_libraries(beast2_example_client_burl crypt32) |
| 38 | +endif() |
46 | 39 |
|
47 | | - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
48 | | - find_package(Libpsl) |
49 | | - if (Libpsl_FOUND) |
50 | | - target_link_libraries(beast2_example_client_burl Libpsl::Libpsl) |
51 | | - target_compile_definitions(beast2_example_client_burl PRIVATE BURL_HAS_LIBPSL) |
52 | | - endif () |
| 40 | +if (TARGET Boost::capy_zlib) |
| 41 | + target_link_libraries(beast2_example_client_burl Boost::capy_zlib) |
| 42 | +endif() |
53 | 43 |
|
| 44 | +if (TARGET Boost::capy_brotli) |
| 45 | + target_link_libraries(beast2_example_client_burl Boost::capy_brotli) |
54 | 46 | endif() |
| 47 | + |
| 48 | +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
| 49 | +find_package(Libpsl) |
| 50 | +if (Libpsl_FOUND) |
| 51 | + target_link_libraries(beast2_example_client_burl Libpsl::Libpsl) |
| 52 | + target_compile_definitions(beast2_example_client_burl PRIVATE BURL_HAS_LIBPSL) |
| 53 | +endif () |
0 commit comments