Skip to content
Closed
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
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -nostdinc")
if (TARGET_i386 OR TARGET_x86_64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w -nostdinc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
Expand All @@ -27,9 +30,12 @@ set(bzip2_sources
if (TARGET_x86_64)
add_darling_object_library(bz264 bzip2/x86_64/crc32vec.S)
set_target_properties(bz264 PROPERTIES COMPILE_FLAGS "-arch x86_64")
else (TARGET_x86_64)
elseif (TARGET_ARM64)
add_darling_object_library(bz264 bzip2/arm64/crc32vec.S)
set_target_properties(bz264 PROPERTIES COMPILE_FLAGS "-arch arm64")
else ()
add_darling_object_library(bz264 empty.c)
endif (TARGET_x86_64)
endif ()

set(DYLIB_INSTALL_NAME "/usr/lib/libbz2.1.0.dylib")
set(DYLIB_COMPAT_VERSION "1.0.0")
Expand Down