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

Fix zlib support for static macos build #225

Merged
merged 1 commit into from
Dec 20, 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
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ option (LAMBDA_WITH_BIFM "Include codepaths for bidirectional indexes." OFF)

if (LAMBDA_STATIC_BUILD)
add_definitions (-DLAMBDA_STATIC_BUILD=1)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
# apple does not support fully static builds, but at least libgcc and libstdc++
if (APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
message (WARNING "WARNING: Builds on Mac are never fully static.")
else (APPLE)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
endif (APPLE)
# on linux cmake adds -rdynamic automatically which clang can't handle in static builds
Expand All @@ -65,7 +65,6 @@ message(STATUS "Remove CMakeCache.txt and re-run cmake with -DOPTIONNAME=ON|OFF
# Search SeqAn and select dependencies.
find_package(OpenMP QUIET)
find_package(ZLIB QUIET)
find_package(BZip2 QUIET)
find_package(SeqAn QUIET REQUIRED CONFIG)

# BIO
Expand All @@ -85,7 +84,6 @@ add_subdirectory(../submodules/fmindex-collection fmindex-collection)
message(STATUS "These dependencies were found:")
message( " BIOCPP-CORE ${BIOCPP_CORE_FOUND} ${BIOCPP_CORE_VERSION}")
message( " BIOCPP-IO ${BIOCPP_IO_FOUND} ${BIOCPP_IO_VERSION}")
message( " BZIP2 ${BZIP2_FOUND} ${BZIP2_VERSION_STRING}")
message( " CEREAL ${CEREAL_FOUND} ${CEREAL_VERSION}")
message( " OPENMP ${OPENMP_FOUND} ${OpenMP_CXX_FLAGS}")
message( " SEQAN ${SEQAN_FOUND} ${SEQAN_VERSION_STRING}")
Expand Down
Loading