Skip to content

Commit 8d65d1e

Browse files
authored
On macOS search for libuv in /opt/homebrew, set CMAKE_MACOSX_RPATH to fix warning. (#562)
1 parent f4e8c4e commit 8d65d1e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,11 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
170170

171171
# OpenSSL is deprecated on later versions of Mac OS X. The long-term solution
172172
# is to provide a CommonCryto implementation.
173-
if (APPLE AND CASS_USE_OPENSSL)
174-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
173+
if (APPLE)
174+
set(CMAKE_MACOSX_RPATH 1)
175+
if(CASS_USE_OPENSSL)
176+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
177+
endif()
175178
endif()
176179

177180
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")

cmake/FindLibuv.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ set(_LIBUV_ROOT_HINTS ${LIBUV_ROOT_DIR}
2424
if(NOT WIN32)
2525
set(_LIBUV_ROOT_PATHS "/usr/"
2626
"/usr/local/")
27+
if (APPLE)
28+
set(_LIBUV_ROOT_PATHS ${_LIBUV_ROOT_PATHS}
29+
"/opt/homebrew/")
30+
endif()
2731
if(_LIBUV_FOUND)
2832
set(_LIBUV_ROOT_PATHS ${_LIBUV_ROOT_PATHS}
2933
${_LIBUV_LIBDIR})

0 commit comments

Comments
 (0)