Skip to content

Commit

Permalink
More improvements to macOS system ncurses detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
clangen committed Mar 19, 2023
1 parent 6282cc8 commit 55410fe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/musikcube/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ endif()

target_include_directories(musikcube BEFORE PRIVATE ${VENDOR_INCLUDE_DIRECTORIES})

if (NOT DEFINED ENABLE_MACOS_SYSTEM_NCURSES)
message(STATUS "[ncurses] ENABLE_MACOS_SYSTEM_NCURSES is not defined, setting to false")
set(ENABLE_MACOS_SYSTEM_NCURSES "false")
endif()

# figure out if we have a "w" suffix or not...
if (${DISABLE_WIDE_NCURSES_LIB_SUFFIXES} MATCHES "true")
if ((${DISABLE_WIDE_NCURSES_LIB_SUFFIXES} MATCHES "true") OR ((APPLE) AND (${ENABLE_MACOS_SYSTEM_NCURSES} MATCHES "true")))
message(STATUS "[ncurses] using library names *WITHOUT* 'w' prefix")
set(CURSES_LIBRARY_NAME ncurses)
set(PANEL_LIBRARY_NAME panel)
Expand All @@ -98,7 +103,7 @@ else()
endif()

if (APPLE)
if ((NOT DEFINED ENV{NIX_CC}) AND (NOT ${DISABLE_STATIC_NCURSES} MATCHES "true"))
if ((NOT DEFINED ENV{NIX_CC}) AND (NOT ${ENABLE_MACOS_SYSTEM_NCURSES} MATCHES "true"))
message(STATUS "[ncurses] detected Darwin, linking statically")
set(CURSES_LIBRARY_NAME "lib${CURSES_LIBRARY_NAME}.a")
set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a")
Expand Down

0 comments on commit 55410fe

Please sign in to comment.