diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index e0ad3606b..e4de8bafc 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -306,6 +306,12 @@ IF(UNIX) DESTINATION .) install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack-run DESTINATION .) + OPTION(INSTALL_NEW_LIBSTDCXX "Install a version of libstdc++ from GCC 4.5.4 to fix various crashes" ON) + IF(INSTALL_NEW_LIBSTDCXX) + execute_process(COMMAND bunzip2 --keep --force ${dfhack_SOURCE_DIR}/package/darwin/libstdc++.6.dylib.bz2) + install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/libstdc++.6.dylib + DESTINATION ./hack/) + ENDIF(INSTALL_NEW_LIBSTDCXX) else() # On linux, copy our version of the df launch script which sets LD_PRELOAD install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack diff --git a/package/darwin/libstdc++.6.dylib.bz2 b/package/darwin/libstdc++.6.dylib.bz2 new file mode 100644 index 000000000..6ff995c63 Binary files /dev/null and b/package/darwin/libstdc++.6.dylib.bz2 differ