Add some homebrew workarounds to build scripts.

This commit is contained in:
casey langen 2023-03-19 11:42:52 -07:00
parent b2652ad643
commit c7dca8cfee
2 changed files with 9 additions and 7 deletions

View File

@ -27,12 +27,14 @@ include(ConfigureCurses)
include(ConfigureCompilerFlags) include(ConfigureCompilerFlags)
include(FindVendorLibrary) include(FindVendorLibrary)
find_program(CCACHE_FOUND ccache) if (NOT DEFINED ENV{HOMEBREW_PREFIX})
if (CCACHE_FOUND) find_program(CCACHE_FOUND ccache)
if (CCACHE_FOUND)
message(STATUS "${BoldGreen}[ccache] ccache enabled!${ColorReset}") message(STATUS "${BoldGreen}[ccache] ccache enabled!${ColorReset}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND) endif(CCACHE_FOUND)
endif()
if (CROSS_COMPILE_SYSROOT) if (CROSS_COMPILE_SYSROOT)
message(STATUS "[cross-compile] enabled, rooted at: ${CROSS_COMPILE_SYSROOT}") message(STATUS "[cross-compile] enabled, rooted at: ${CROSS_COMPILE_SYSROOT}")

View File

@ -98,7 +98,7 @@ else()
endif() endif()
if (APPLE) if (APPLE)
if (NOT DEFINED ENV{NIX_CC}) if ((NOT DEFINED ENV{NIX_CC}) AND (NOT ${DISABLE_STATIC_NCURSES} MATCHES "true"))
message(STATUS "[ncurses] detected Darwin, linking statically") message(STATUS "[ncurses] detected Darwin, linking statically")
set(CURSES_LIBRARY_NAME "lib${CURSES_LIBRARY_NAME}.a") set(CURSES_LIBRARY_NAME "lib${CURSES_LIBRARY_NAME}.a")
set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a") set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a")