Skip to content

Commit

Permalink
Support building with curl v7.77 or higher in mac
Browse files Browse the repository at this point in the history
by linking with the Core Foundation framework and the System Configuration framework.
  • Loading branch information
abitmore committed Oct 29, 2022
1 parent 834f8cd commit e6c0744
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ macro(FIND_CURL)
find_package(CURL REQUIRED)
endif (NOT WIN32 AND NOT APPLE AND CURL_STATICLIB)

if( APPLE AND NOT "${CURL_VERSION_STRING}" VERSION_LESS "7.77.0" )
list( APPEND CURL_LIBRARIES "-framework CoreFoundation" )
list( APPEND CURL_LIBRARIES "-framework SystemConfiguration" )
endif()

message(STATUS "CURL libraries: ${CURL_LIBRARIES}")

if( WIN32 )
if ( MSVC )
list( APPEND CURL_LIBRARIES Wldap32 )
Expand Down Expand Up @@ -261,7 +268,7 @@ else( WIN32 ) # Apple AND Linux

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

0 comments on commit e6c0744

Please sign in to comment.