Commit af7e5d03 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Nicolas Fella
Browse files

Check whether intltook ran properly rather than just checking the output

I was getting a weird warning about the locales that should not
influence the output of the command.
Checking the exit code is more correct than assuming that any output is
a problem.
parent 20dbcfd2
......@@ -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} ERROR_VARIABLE intltool_error)
if(intltool_error)
message(FATAL_ERROR "error processing ${provider_in_file}: ${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}")
endif()
if (NOT ACCOUNTS_PROVIDERS_DIR)
message(FATAL_ERROR "ACCOUNTS_PROVIDERS_DIR not set, did you find_package (KAccounts REQUIRED) ?")
......@@ -31,9 +31,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} ERROR_VARIABLE intltool_error)
if(intltool_error)
message(FATAL_ERROR "error processing ${service_file_in}: ${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}")
endif()
if (NOT ACCOUNTS_SERVICES_DIR)
message(FATAL_ERROR "ACCOUNTS_SERVICES_DIR not set, did you find_package (KAccounts REQUIRED) ?")
......
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