summaryrefslogtreecommitdiff
path: root/po/CMakeLists.txt
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-05-13 11:59:18 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-05-13 11:59:18 +0200
commit6415c09a077e2564fe5e6548e09caa1dade0a3fc (patch)
tree6dfb5429f01ffc41e9f5b8375531e0482e498982 /po/CMakeLists.txt
parentadbfd276604bc8025e439ab0ec7345d26a8bc4e8 (diff)
downloadweechat-6415c09a077e2564fe5e6548e09caa1dade0a3fc.zip
core: add quotes around paths in CMake files (closes #29)
Diffstat (limited to 'po/CMakeLists.txt')
-rw-r--r--po/CMakeLists.txt28
1 files changed, 14 insertions, 14 deletions
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 963185239..1fda0cb38 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -34,8 +34,8 @@ set(PO_FILES
)
set(BUGS_ADDRESS "flashcode@flashtux.org")
-set(POT_FILE ${PROJECT_NAME}.pot)
-set(POT_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/${POT_FILE})
+set(POT_FILE "${PROJECT_NAME}.pot")
+set(POT_FILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${POT_FILE}")
include(srcfiles.cmake)
@@ -52,13 +52,13 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
foreach(srcfile ${WEECHAT_SOURCES})
set(SRC_FILES ${SRC_FILES} ${srcfile})
- set(POT_DEPENDS ${POT_DEPENDS} ${CMAKE_SOURCE_DIR}/${srcfile})
+ set(POT_DEPENDS ${POT_DEPENDS} "${CMAKE_SOURCE_DIR}/${srcfile}")
endforeach()
add_custom_command(
- OUTPUT ${POT_FILE_PATH}
- COMMAND ${XGETTEXT_EXECUTABLE}
- ARGS -o ${POT_FILE_PATH} --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory=${CMAKE_SOURCE_DIR} --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
+ OUTPUT "${POT_FILE_PATH}"
+ COMMAND "${XGETTEXT_EXECUTABLE}"
+ ARGS -o "${POT_FILE_PATH}" --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory="${CMAKE_SOURCE_DIR}" --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
DEPENDS ${POT_DEPENDS}
COMMENT "Generating ${POT_FILE}"
)
@@ -73,23 +73,23 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
file(MAKE_DIRECTORY "${modir}")
set(mofile "${modir}/${PROJECT_NAME}.mo")
add_custom_command(
- OUTPUT ${mofile}
- COMMAND ${MSGMERGE_EXECUTABLE} ARGS --quiet -o ${CMAKE_CURRENT_BINARY_DIR}/${pofile} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile} ${POT_FILE_PATH}
- COMMAND ${MSGFMT_EXECUTABLE} ARGS -o ${mofile} ${CMAKE_CURRENT_BINARY_DIR}/${pofile}
- COMMAND ${MSGFMT_EXECUTABLE} ARGS -c --statistics --verbose --output-file=/dev/null ${CMAKE_CURRENT_BINARY_DIR}/${pofile}
- DEPENDS ${POT_FILE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}
+ OUTPUT "${mofile}"
+ COMMAND "${MSGMERGE_EXECUTABLE}" ARGS --quiet -o "${CMAKE_CURRENT_BINARY_DIR}/${pofile}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" ${POT_FILE_PATH}
+ COMMAND "${MSGFMT_EXECUTABLE}" ARGS -o "${mofile}" "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
+ COMMAND "${MSGFMT_EXECUTABLE}" ARGS -c --statistics --verbose --output-file=/dev/null "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
+ DEPENDS "${POT_FILE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}"
COMMENT "Compiling ${polang}.po"
)
# Update .po files in source directory (if needed)
add_custom_target(
update-${pofile}
- COMMAND ${MSGMERGE_EXECUTABLE} --quiet --update --previous --backup=none ${CMAKE_CURRENT_SOURCE_DIR}/${pofile} ${POT_FILE_PATH}
+ COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --previous --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" "${POT_FILE_PATH}"
COMMENT "Updating ${polang}.po"
)
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
- install(FILES ${mofile} DESTINATION ${LOCALEDIR}/${polang}/LC_MESSAGES)
+ install(FILES "${mofile}" DESTINATION "${LOCALEDIR}/${polang}/LC_MESSAGES")
set(MO_FILES ${MO_FILES} ${mofile})
endforeach()
@@ -98,7 +98,7 @@ if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
# Update weechat.pot in source directory (if needed)
add_custom_target(
update-${POT_FILE}
- COMMAND ${MSGMERGE_EXECUTABLE} --quiet --update --backup=none ${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE} ${POT_FILE_PATH}
+ COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE}" "${POT_FILE_PATH}"
COMMENT "Updating ${POT_FILE}"
)