From ea0105fa66ba53113756b5f193fbf2613eb8ee31 Mon Sep 17 00:00:00 2001 From: lethosor Date: Sat, 20 Jul 2019 11:21:44 -0400 Subject: [PATCH] Add CMake option to provide custom libstdc++ on macOS (#1344) --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 575f40288..9a9a03caf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -296,6 +296,7 @@ if(WIN32) endif() endif() +option(EXTERNAL_LIBSTDCXX "macOS only: Avoid installing the DFHack-provided libstdc++." OFF) if(APPLE) # libstdc++ (GCC 4.8.5 for OS X 10.6) # fixes crash-on-unwind bug in DF's libstdc++ @@ -346,9 +347,10 @@ if(APPLE) endif() endif() - install(PROGRAMS ${LIBSTDCXX_DOWNLOAD_DIR}/libstdc++.6.dylib - DESTINATION ./hack/) - + if(NOT EXTERNAL_LIBSTDCXX) + install(PROGRAMS ${LIBSTDCXX_DOWNLOAD_DIR}/libstdc++.6.dylib + DESTINATION ./hack/) + endif() endif() #### expose depends ####