summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-17 12:57:28 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-17 12:57:28 (GMT)
commitbffe96056d41bebf8b1d7a85364c08b11f8e3d1f (patch)
treecd635efae69c697fc359cbbd74eb820e342a6da0 /Modules
parentad9c5c54f3b4898c7f04620fe95a74a043624dc2 (diff)
parent51305f52f016635bc391e69752ff269fc889a867 (diff)
downloadCMake-bffe96056d41bebf8b1d7a85364c08b11f8e3d1f.zip
CMake-bffe96056d41bebf8b1d7a85364c08b11f8e3d1f.tar.gz
CMake-bffe96056d41bebf8b1d7a85364c08b11f8e3d1f.tar.bz2
Merge topic 'readable-lupdate.pro'
51305f5 Qt4: make pro files generated for translations easier to read
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Qt4Macros.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index e56634d..b5f005f 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -432,15 +432,16 @@ macro(QT4_CREATE_TRANSLATION _qm_files)
set(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
set(_pro_srcs)
foreach(_pro_src ${_my_sources})
- set(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
+ set(_pro_srcs "${_pro_srcs} \\\n \"${_pro_src}\"")
endforeach()
set(_pro_includes)
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
+ list(REMOVE_DUPLICATES _inc_DIRS)
foreach(_pro_include ${_inc_DIRS})
get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
- set(_pro_includes "${_pro_includes} \"${_abs_include}\"")
+ set(_pro_includes "${_pro_includes} \\\n \"${_abs_include}\"")
endforeach()
- file(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}\nINCLUDEPATH = ${_pro_includes}\n")
+ file(WRITE ${_ts_pro} "SOURCES =${_pro_srcs}\nINCLUDEPATH =${_pro_includes}\n")
endif()
add_custom_command(OUTPUT ${_ts_file}
COMMAND ${QT_LUPDATE_EXECUTABLE}