diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2009-03-25 19:29:46 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2009-03-25 19:29:46 (GMT) |
commit | 6a6ade8de26ed2d6603ae63495bb4da6568a1784 (patch) | |
tree | 83d2f5c9a2621ff34260a80d28fafe825260d6b0 /Modules/FindQt4.cmake | |
parent | 5f4686920d3615187c53f3064eb7f1345b2203b2 (diff) | |
download | CMake-6a6ade8de26ed2d6603ae63495bb4da6568a1784.zip CMake-6a6ade8de26ed2d6603ae63495bb4da6568a1784.tar.gz CMake-6a6ade8de26ed2d6603ae63495bb4da6568a1784.tar.bz2 |
ENH: Support OUTPUT_LOCATION property for qm files.
Fixes #8492.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index f9614d0..e745605 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1260,7 +1260,13 @@ IF (QT4_QMAKE_FOUND) FOREACH (_current_FILE ${ARGN}) GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE) - SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION) + IF(output_location) + FILE(MAKE_DIRECTORY "${output_location}") + SET(qm "${output_location}/${qm}.qm") + ELSE(output_location) + SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + ENDIF(output_location) ADD_CUSTOM_COMMAND(OUTPUT ${qm} COMMAND ${QT_LRELEASE_EXECUTABLE} |