Skip to content

Commit e6c0744

Browse files
committed
Support building with curl v7.77 or higher in mac
by linking with the Core Foundation framework and the System Configuration framework.
1 parent 834f8cd commit e6c0744

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ macro(FIND_CURL)
5959
find_package(CURL REQUIRED)
6060
endif (NOT WIN32 AND NOT APPLE AND CURL_STATICLIB)
6161

62+
if( APPLE AND NOT "${CURL_VERSION_STRING}" VERSION_LESS "7.77.0" )
63+
list( APPEND CURL_LIBRARIES "-framework CoreFoundation" )
64+
list( APPEND CURL_LIBRARIES "-framework SystemConfiguration" )
65+
endif()
66+
67+
message(STATUS "CURL libraries: ${CURL_LIBRARIES}")
68+
6269
if( WIN32 )
6370
if ( MSVC )
6471
list( APPEND CURL_LIBRARIES Wldap32 )
@@ -261,7 +268,7 @@ else( WIN32 ) # Apple AND Linux
261268

262269
if( APPLE )
263270
# Apple Specific Options Here
264-
message( STATUS "Configuring BitShares on OS X" )
271+
message( STATUS "Configuring BitShares on macOS" )
265272
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -stdlib=libc++ -Wall -fvisibility-inlines-hidden -fvisibility=hidden" )
266273
else( APPLE )
267274
if ( "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" )

0 commit comments

Comments
 (0)