Commit 660436a0 authored by Adriaan de Groot's avatar Adriaan de Groot 💬 Committed by Albert Astals Cid
Browse files

Use the executable for intltool once it is found.

Do not assume that the tool -- found with find_program() is also
in PATH; this also allows setting INTLTOOL_MERGE via other routes
to influence the build.
parent 89184d2b
Pipeline #122100 passed with stage
in 38 seconds
......@@ -9,9 +9,9 @@ function(kaccounts_add_provider provider_in_file)
if(NOT INTLTOOL_MERGE)
message(FATAL_ERROR "Could not find required intltool-merge executable.")
endif()
execute_process(COMMAND intltool-merge -x -u --no-translations ${provider_in_file} ${provider_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error)
execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${provider_in_file} ${provider_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error)
if(NOT intltool_output EQUAL 0)
message(FATAL_ERROR "error processing ${provider_in_file}: ${intltool_output} ${intltool_error}")
message(FATAL_ERROR "error processing ${provider_in_file} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}")
endif()
# The suffix must match whatever we set for $XDG_CURRENT_DESKTOP
install(FILES ${provider_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/providers/kde/)
......@@ -28,9 +28,9 @@ function(kaccounts_add_service service_file_in)
if(NOT INTLTOOL_MERGE)
message(FATAL_ERROR "Could not find required intltool-merge executable.")
endif()
execute_process(COMMAND intltool-merge -x -u --no-translations ${service_file_in} ${service_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error)
execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${service_file_in} ${service_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error)
if(NOT intltool_output EQUAL 0)
message(FATAL_ERROR "error processing ${service_file_in}: ${intltool_output} ${intltool_error}")
message(FATAL_ERROR "error processing ${service_file_in} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}")
endif()
# The suffix must match whatever we set for $XDG_CURRENT_DESKTOP
install(FILES ${service_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services/kde/)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment