Showing with 7 additions and 3 deletions.
  1. +6 −2 cmake/modules/KstPchSupport.cmake
  2. +1 −1 src/kst/main.cpp
8 changes: 6 additions & 2 deletions cmake/modules/KstPchSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ macro(kst_add_pch_rule _header _sources _lib_type)
if(CMAKE_COMPILER_IS_GNUCC)
# first we have to find all compiler arguments
get_directory_property(_definitions COMPILE_DEFINITIONS)
foreach (_it ${_definitions})
list(APPEND _args "$<$<BOOL:${_it}>:-D${_it}>")
foreach(_it ${_definitions})
if(CMAKE_MAJOR_VERSION LESS 3)
list(APPEND _args "-D${_it}")
else()
list(APPEND _args "$<$<BOOL:${_it}>:-D${_it}>")
endif()
endforeach()

list(APPEND _args ${CMAKE_CXX_FLAGS})
Expand Down
2 changes: 1 addition & 1 deletion src/kst/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) {

// The "in the directory with the binary" localization
QTranslator kstDirectoryTranslator;
bool ok = kstDirectoryTranslator.load(localeName, app.applicationDirPath() + "/../share/kst" + localeSuffix);
//bool ok = kstDirectoryTranslator.load(localeName, app.applicationDirPath() + "/../share/kst" + localeSuffix);
// qDebug() << "Translation file " + localeName + " loaded:" << ok;
// qDebug() << "Dir = " + app.applicationDirPath() + "/../share/kst" + localeSuffix;
app.installTranslator(&kstDirectoryTranslator);
Expand Down