macOS-related CMake cleanups

* Remove useless explicitly specified link/include directories
* Don't pass -s or -pie to the linker as they aren't needed
This commit is contained in:
Nadia Holmquist Pedersen 2021-05-02 16:29:48 +02:00
parent 63415f0eeb
commit d6036f9225
2 changed files with 4 additions and 7 deletions

View File

@ -87,8 +87,10 @@ endif()
if (CMAKE_BUILD_TYPE STREQUAL Release) if (CMAKE_BUILD_TYPE STREQUAL Release)
add_compile_options(-O3) add_compile_options(-O3)
if (NOT APPLE)
add_link_options(-s) add_link_options(-s)
endif() endif()
endif()
if (WIN32) if (WIN32)
option(BUILD_STATIC "Statically link dependencies" OFF) option(BUILD_STATIC "Statically link dependencies" OFF)
@ -99,7 +101,7 @@ if (BUILD_STATIC AND WIN32)
endif() endif()
if (ENABLE_LTO) if (ENABLE_LTO)
if (WIN32) if (WIN32 OR APPLE)
add_compile_options(-flto) add_compile_options(-flto)
add_link_options(-flto) add_link_options(-flto)
else() else()

View File

@ -100,11 +100,6 @@ if (ENABLE_JIT)
endif() endif()
endif() endif()
if (APPLE)
target_include_directories(core PUBLIC /usr/local/include /opt/homebrew/include)
target_link_directories(core PUBLIC /usr/local/lib /opt/homebrew/lib)
endif()
if (ENABLE_OGLRENDERER) if (ENABLE_OGLRENDERER)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(EPOXY REQUIRED epoxy) pkg_check_modules(EPOXY REQUIRED epoxy)