From 37f7b1ca3b4d4ec6a3531aa8742d214c63ace949 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Wed, 21 Apr 2010 11:03:30 +0000 Subject: [PATCH] Use lconvert from the Qt sdk rather than $PATH, if it's available --- CMakeLists.txt | 4 ++++ src/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4b933bf6..def99201a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,10 @@ if(UNIX AND NOT APPLE) endif(UNIX AND NOT APPLE) find_package(Qt4 COMPONENTS Phonon) +# Find Qt's lconvert binary. Try qt's binary dir first, fall back to looking in PATH +find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt4 PATHS ${QT_BINARY_DIR} NO_DEFAULT_PATH) +find_program(QT_LCONVERT_EXECUTABLE NAMES lconvert lconvert-qt4) + if(APPLE) if(NOT QT_MAC_USE_COCOA) message(FATAL_ERROR "Cocoa support is required") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 08683f036..cd94c2f7a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -318,7 +318,7 @@ foreach (_lang ${CLEMENTINE-LANGUAGES}) set(_qm_filepath "${CMAKE_CURRENT_BINARY_DIR}/${_qm_filename}") add_custom_command(OUTPUT ${_qm_filepath} - COMMAND lconvert ARGS ${_po_filepath} -o ${_qm_filepath} -of qm + COMMAND ${QT_LCONVERT_EXECUTABLE} ARGS ${_po_filepath} -o ${_qm_filepath} -of qm MAIN_DEPENDENCY ${_po_filepath} ) set(CLEMENTINE-QM-FILES ${CLEMENTINE-QM-FILES} ${_qm_filepath})