mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
OpenBSD build fixes.
This commit is contained in:
parent
00cf3eb59d
commit
b87c8d1152
@ -103,10 +103,18 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
if (${NCURSES_DISABLE_LIB_SUFFIXES} MATCHES "true")
|
||||
pkg_check_modules(NCURSES REQUIRED ncurses panel)
|
||||
# pkg_check_modules fails on some systems, including OpenBSD.
|
||||
# pkg_check_modules(NCURSES REQUIRED ncurses panel)
|
||||
ensure_library_exists(ncurses)
|
||||
ensure_library_exists(panel)
|
||||
set(NCURSES_LIBRARIES, ncurses panel)
|
||||
message(STATUS "[ncurses] using library names without 'w' prefix")
|
||||
else()
|
||||
pkg_check_modules(NCURSES REQUIRED ncursesw panelw)
|
||||
# pkg_check_modules fails on some systems, including OpenBSD.
|
||||
# pkg_check_modules(NCURSES REQUIRED ncursesw panelw)
|
||||
ensure_library_exists(ncursesw)
|
||||
ensure_library_exists(panelw)
|
||||
set(NCURSES_LIBRARIES, ncursesw panelw)
|
||||
message(STATUS "[ncurses] using library names with 'w' prefix")
|
||||
endif()
|
||||
target_link_libraries(musikcube ${musikcube_LINK_LIBS} ${NCURSES_LIBRARIES} musikcore)
|
||||
|
@ -243,6 +243,16 @@ App::App(const std::string& title) {
|
||||
throw std::runtime_error("app instance already running!");
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
if (!isLangUtf8()) {
|
||||
std::cout << "\n\nThis application requires a UTF-8 compatible LANG environment "
|
||||
"variable to be set in the controlling terminal. Setting to C.UTF-8. Depending on "
|
||||
"your environment, you may see corrupted output. If that'st he case, try to set "
|
||||
"LANG=C.UTF-8 before starting musikcube.\n\n\n\n";
|
||||
setenv("LANG", "C.UTF-8", 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
instance = this; /* only one instance. */
|
||||
this->quit = false;
|
||||
this->minWidth = this->minHeight = 0;
|
||||
@ -493,12 +503,6 @@ void App::Run(ILayoutPtr layout) {
|
||||
if (App::Running(this->uniqueId, this->appTitle)) {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if (!isLangUtf8()) {
|
||||
std::cout << "\n\nThis application requires a UTF-8 compatible LANG environment "
|
||||
"variable to be set in the controlling terminal. Exiting.\n\n\n";
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
int64_t ch;
|
||||
|
Loading…
x
Reference in New Issue
Block a user