From cacd197f74edeb392fa5c451091e4bd372ffe93f Mon Sep 17 00:00:00 2001 From: louisjb Date: Fri, 12 Feb 2010 19:09:38 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/pianobooster/code/trunk@106 ba081f5d-443b-49a7-ac4b-446c3f91f371 --- PianoBooster/CMakeLists.txt | 10 ++++++++-- PianoBooster/src/CMakeLists.txt | 3 ++- PianoBooster/src/QtMain.cpp | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/PianoBooster/CMakeLists.txt b/PianoBooster/CMakeLists.txt index 11e1a4a..fe832f6 100644 --- a/PianoBooster/CMakeLists.txt +++ b/PianoBooster/CMakeLists.txt @@ -1,2 +1,8 @@ -ADD_SUBDIRECTORY(src build2) -ADD_SUBDIRECTORY(translations build2/translations) +cmake_minimum_required(VERSION 2.4) +if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +endif(COMMAND cmake_policy) + + +ADD_SUBDIRECTORY(src build) +ADD_SUBDIRECTORY(translations build/translations) diff --git a/PianoBooster/src/CMakeLists.txt b/PianoBooster/src/CMakeLists.txt index 5fabca9..8b3f5d8 100644 --- a/PianoBooster/src/CMakeLists.txt +++ b/PianoBooster/src/CMakeLists.txt @@ -214,10 +214,11 @@ INSTALL( FILES pianobooster.desktop DESTINATION share/applications ) INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin) #INSTALL( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kmidimon ) -INSTALL( FILES ../README.txt DESTINATION share/doc/pianobooster ) +INSTALL( FILES ../README.txt DESTINATION share/pianobooster/doc/ ) INSTALL ( FILES images/pianobooster.png DESTINATION share/pixmaps ) +INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/translations/*.qm DESTINATION share/pianobooster/translations/ ) diff --git a/PianoBooster/src/QtMain.cpp b/PianoBooster/src/QtMain.cpp index 4f46dc3..00261b9 100644 --- a/PianoBooster/src/QtMain.cpp +++ b/PianoBooster/src/QtMain.cpp @@ -47,7 +47,8 @@ int main(int argc, char *argv[]) QTranslator translator; if (!translator.load(QSTR_APPNAME + QString("_") + locale , localeDirectory)) - translator.load(QSTR_APPNAME + QString("_") + locale, QApplication::applicationDirPath()); + if (!translator.load(QSTR_APPNAME + QString("_") + locale, QApplication::applicationDirPath() + "/translations/")) + translator.load(QSTR_APPNAME + QString("_") + locale, QApplication::applicationDirPath()); app.installTranslator(&translator);