diff --git a/CMakeLists.txt b/CMakeLists.txt index 31f20a40..ba09c7d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,10 @@ add_library( ixwebsocket STATIC # gcc/Linux needs -pthread find_package(Threads) +if (APPLE AND USE_TLS) + target_link_libraries(ixwebsocket "-framework foundation" "-framework security") +endif() + if(UNIX AND NOT APPLE) find_package(OpenSSL REQUIRED) add_definitions(${OPENSSL_DEFINITIONS}) diff --git a/ws/CMakeLists.txt b/ws/CMakeLists.txt index bc4ea6d2..5b1478d7 100644 --- a/ws/CMakeLists.txt +++ b/ws/CMakeLists.txt @@ -50,9 +50,5 @@ add_executable(ws ws_cobra_to_sentry.cpp ws.cpp) -if (APPLE AND USE_TLS) - target_link_libraries(ws "-framework foundation" "-framework security") -endif() - target_link_libraries(ws ixwebsocket) install(TARGETS ws RUNTIME DESTINATION bin)