File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ foreach(SRC ${ALL_EXAMPLES})
77 get_filename_component (NAME ${SRC} NAME_WLE )
88 # ticker requires
99 if (NAME STREQUAL ticker)
10- if (TARGET Boost::json)
10+ if (TARGET Boost::json AND OPENSSL_FOUND )
1111 add_executable (boost_cobalt_example_${NAME} ${SRC} )
1212 target_link_libraries (boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::json Boost::url OpenSSL::SSL )
1313 target_compile_definitions (boost_cobalt_example_${NAME} PUBLIC )
@@ -40,8 +40,17 @@ foreach(SRC ${ALL_EXAMPLES})
4040 continue ()
4141 endif ()
4242
43+ if (NAME STREQUAL http)
44+ if (OPENSSL_FOUND)
45+ add_executable (boost_cobalt_example_${NAME} ${SRC} )
46+ target_link_libraries (boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::cobalt::io OpenSSL::SSL )
47+ target_compile_definitions (boost_cobalt_example_${NAME} PUBLIC )
48+ endif ()
49+ continue ()
50+ endif ()
51+
4352 add_executable (boost_cobalt_example_${NAME} ${SRC} )
44- target_link_libraries (boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::cobalt::io OpenSSL::SSL )
53+ target_link_libraries (boost_cobalt_example_${NAME} PUBLIC Boost::cobalt Boost::cobalt::io )
4554 target_compile_definitions (boost_cobalt_example_${NAME} PUBLIC )
4655 if (NAME STREQUAL echo_server)
4756 target_link_libraries (boost_cobalt_example_${NAME} PUBLIC Boost::cobalt::io )
Original file line number Diff line number Diff line change @@ -36,5 +36,6 @@ add_executable(boost_cobalt_io_test EXCLUDE_FROM_ALL
3636 io/endpoint.cpp
3737 io/lookup.cpp
3838 )
39- target_link_libraries (boost_cobalt_io_test Boost::cobalt::io Boost::unit_test_framework OpenSSL::SSL OpenSSL::Crypto Boost::url )
39+
40+ target_link_libraries (boost_cobalt_io_test Boost::cobalt::io Boost::unit_test_framework Boost::url )
4041add_dependencies (tests boost_cobalt_main boost_cobalt_basic_tests boost_cobalt_static_tests boost_cobalt_experimental boost_cobalt_io_test )
You can’t perform that action at this time.
0 commit comments