From f3261c2018746da70484cdd5d69d3917e4a16461 Mon Sep 17 00:00:00 2001 From: Luca Palano Date: Wed, 19 Jun 2019 23:21:07 +0200 Subject: [PATCH] Allow to compile using g++ on Mac OS X Add the conditions in the CMakeList.txt file in order to compile on Mac OS X using g++ . Signed-off-by: Luca Palano --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d13117ba..4e0ca19ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,7 +123,11 @@ if (BUILD_TESTS OR BUILD_EXAMPLES) # g++ if (CMAKE_COMPILER_IS_GNUCXX) - set (WEBSOCKETPP_PLATFORM_LIBS pthread rt) + if (NOT APPLE) + set (WEBSOCKETPP_PLATFORM_LIBS pthread rt) + else() + set (WEBSOCKETPP_PLATFORM_LIBS pthread) + endif() set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto) set (WEBSOCKETPP_BOOST_LIBS system thread) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")