Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove now unneeded macOS z/bz2/lzma/zstd boost iostreams workaround #1629

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove now unneeded macOS z/bz2/lzma/zstd iostreams workaround
  • Loading branch information
spoonincode committed Sep 13, 2023
commit c9a40f6e2abdc0bcbbd71d752f65f93c7454b1da
13 changes: 0 additions & 13 deletions libraries/libfc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ file( GLOB_RECURSE fc_headers ${CMAKE_CURRENT_SOURCE_DIR} *.hpp *.h )

add_library(fc ${fc_sources} ${fc_headers})

# Yuck: newer CMake files from boost iostreams will effectively target_link_libraries(Boost::iostreams z;bz2;lzma;zstd)
# without first "finding" those libraries. This resolves to simple -lz -lbz2 etc: it'll look for those libraries in the linker's
# library search path. This is most problematic on macOS where something like libzstd isn't in the standard search path. Historically
# fc would just "-L/usr/local/lib" as a heavy handed way to make sure something like -lzstd can be found in brew's library path. But
# that isn't sufficient for something like ARM homebrew. Let's just "null" these libraries out since we're already linking to zlib
# explicitly anyways via a proper find_package(ZLIB) below.
if(APPLE)
add_library(z INTERFACE)
add_library(bz2 INTERFACE)
add_library(lzma INTERFACE)
add_library(zstd INTERFACE)
endif()

find_path(GMP_INCLUDE_DIR NAMES gmp.h)
find_library(GMP_LIBRARY gmp)
if(NOT GMP_LIBRARY MATCHES ${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand Down