1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:27:45 +00:00

Toolchain: Allow building using CMake on macOS

This commit is contained in:
Stefano Cristiano 2020-07-08 23:57:51 +02:00 committed by Andreas Kling
parent 617655db0d
commit a1e1aa96fb
3 changed files with 32 additions and 5 deletions

View file

@ -126,6 +126,22 @@ set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib)
set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}strip)
set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar)
foreach(lang ASM C CXX OBJC OBJCXX)
unset(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG)
unset(CMAKE_${lang}_OSX_CURRENT_VERSION_FLAG)
unset(CMAKE_${lang}_LINK_FLAGS)
unset(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS)
unset(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS)
unset(CMAKE_SHARED_MODULE_LOADER_${lang}_FLAG )
unset(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG)
unset(CMAKE_${lang}_SYSROOT_FLAG)
unset(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG)
endforeach()
set(CMAKE_INSTALL_NAME_TOOL "true")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared")
#FIXME: -fstack-protector
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -Wno-sized-deallocation -fno-sized-deallocation -fno-exceptions -fno-rtti -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy -Wno-expansion-to-defined")