From d6036f92254b53b67c0b32c9b02f9d6575f1953f Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 2 May 2021 16:29:48 +0200 Subject: 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 --- CMakeLists.txt | 6 ++++-- src/CMakeLists.txt | 5 ----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c18164..66d0461 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,9 @@ endif() if (CMAKE_BUILD_TYPE STREQUAL Release) add_compile_options(-O3) - add_link_options(-s) + if (NOT APPLE) + add_link_options(-s) + endif() endif() if (WIN32) @@ -99,7 +101,7 @@ if (BUILD_STATIC AND WIN32) endif() if (ENABLE_LTO) - if (WIN32) + if (WIN32 OR APPLE) add_compile_options(-flto) add_link_options(-flto) else() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc32b2a..c899745 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -100,11 +100,6 @@ if (ENABLE_JIT) 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) find_package(PkgConfig REQUIRED) pkg_check_modules(EPOXY REQUIRED epoxy) -- cgit v1.2.3