diff options
Diffstat (limited to 'templates/CMakeLists.txt.template')
-rw-r--r-- | templates/CMakeLists.txt.template | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index c647ea5707..88e518f132 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -314,8 +314,10 @@ set(CMAKE_CXX_FLAGS "<%text>${CMAKE_CXX_FLAGS}</%text> -std=c++11") endif() - if(UNIX) - set(_gRPC_ALLTARGETS_LIBRARIES dl rt m pthread) + if(_gRPC_PLATFORM_MAC) + set(_gRPC_ALLTARGETS_LIBRARIES <%text>${CMAKE_DL_LIBS}</%text> m pthread) + elseif(UNIX) + set(_gRPC_ALLTARGETS_LIBRARIES <%text>${CMAKE_DL_LIBS}</%text> rt m pthread) endif() if(WIN32 AND MSVC) |