Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cmake generator error #338

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 3rdparty/terminalwidget/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ set(HDRS_DISTRIB
)

option(RUNDIR_KEYBOARD_LAYOUT_FIRST "Load keyboard layouts from application runtime directory" OFF)
message(STATUS "Use runtime directory keyboard layouts first: ${RUNDIR_KEYBOARD_LAYOUT_FIRST}")
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(RUNDIR_KEYBOARD_LAYOUT_FIRST ON) # enable runtime layouts loading for debug
endif()
message(STATUS "Use runtime directory keyboard layouts first: ${RUNDIR_KEYBOARD_LAYOUT_FIRST}")

# dirs
set(KB_LAYOUT_DIR "${CMAKE_INSTALL_FULL_DATADIR}/${TERMINALWIDGET_LIBRARY_NAME}/kb-layouts")
Expand Down Expand Up @@ -256,7 +256,7 @@ target_compile_definitions(${TERMINALWIDGET_LIBRARY_NAME}
"TRANSLATIONS_DIR=\"${TRANSLATIONS_DIR}\""
"HAVE_POSIX_OPENPT"
"HAVE_SYS_TIME_H"
$<$<BOOL:RUNDIR_KEYBOARD_LAYOUT_FIRST>:RUNDIR_KEYBOARD_LAYOUT_FIRST>
$<$<BOOL:${RUNDIR_KEYBOARD_LAYOUT_FIRST}>:RUNDIR_KEYBOARD_LAYOUT_FIRST>
)


Expand Down
14 changes: 10 additions & 4 deletions 3rdparty/terminalwidget/lib/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ QString get_kb_layout_dir()
} else if (d.exists("../Resources/kb-layouts")) {
ret = d.absoluteFilePath("../Resources/kb-layouts");
}
#else
if (!ret.isEmpty()) {
qCInfo(qLcTools) << "Found local keyboard layout directory:" << ret;
return ret.append(QDir::separator());
}
#endif
d.setPath(QLatin1String(KB_LAYOUT_DIR));
if (d.exists()) {
ret = d.absolutePath();
qCInfo(qLcTools) << "Found global keyboard layout directory:" << ret;
return ret.append(QDir::separator());
} else {
qCWarning(qLcTools) << "Keyboard layout directory not found!";
return "";
}
#endif
qCInfo(qLcTools) << "Found keyboard layout directory:" << ret;
return ret.append(QDir::separator());
}

/*! Helper function to add custom location of color schemes.
Expand Down
Loading