Warning, /network/kaccounts-integration/src/lib/KAccountsMacros.cmake is written in an unsupported language. File is not indexed.
0001 function(kaccounts_add_provider provider_in_file) 0002 if (NOT IS_ABSOLUTE "${provider_in_file}") 0003 set(provider_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${provider_in_file}) 0004 endif() 0005 0006 get_filename_component(provider_filename ${provider_in_file} NAME_WE) 0007 set(provider_file ${CMAKE_CURRENT_BINARY_DIR}/${provider_filename}.provider) 0008 find_program(INTLTOOL_MERGE intltool-merge) 0009 if(NOT INTLTOOL_MERGE) 0010 message(FATAL_ERROR "Could not find required intltool-merge executable.") 0011 endif() 0012 execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${provider_in_file} ${provider_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error) 0013 if(NOT intltool_output EQUAL 0) 0014 message(FATAL_ERROR "error processing ${provider_in_file} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}") 0015 endif() 0016 # The suffix must match whatever we set for $XDG_CURRENT_DESKTOP 0017 install(FILES ${provider_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/providers/kde/) 0018 endfunction() 0019 0020 function(kaccounts_add_service service_file_in) 0021 if (NOT IS_ABSOLUTE "${service_file_in}") 0022 set(service_file_in ${CMAKE_CURRENT_SOURCE_DIR}/${service_file_in}) 0023 endif() 0024 0025 get_filename_component(service_filename ${service_file_in} NAME_WE) 0026 set(service_file ${CMAKE_CURRENT_BINARY_DIR}/${service_filename}.service) 0027 find_program(INTLTOOL_MERGE intltool-merge) 0028 if(NOT INTLTOOL_MERGE) 0029 message(FATAL_ERROR "Could not find required intltool-merge executable.") 0030 endif() 0031 execute_process(COMMAND ${INTLTOOL_MERGE} -x -u --no-translations ${service_file_in} ${service_file} RESULT_VARIABLE intltool_output ERROR_VARIABLE intltool_error) 0032 if(NOT intltool_output EQUAL 0) 0033 message(FATAL_ERROR "error processing ${service_file_in} with ${INTLTOOL_MERGE}: ${intltool_output} ${intltool_error}") 0034 endif() 0035 # The suffix must match whatever we set for $XDG_CURRENT_DESKTOP 0036 install(FILES ${service_file} DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services/kde/) 0037 endfunction()