Skip to content

Commit

Permalink
Merge pull request #2665 from bitshares/fix-macos-build
Browse files Browse the repository at this point in the history
Support building with curl v7.77 or higher in mac
  • Loading branch information
abitmore authored Oct 30, 2022
2 parents 834f8cd + e6c0744 commit 61d3fb0
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 61d3fb0

Please sign in to comment.