Unverified Commit a4ab9142 authored by Luca Beltrame's avatar Luca Beltrame
Browse files

Revert "Drop FindAccountsFileDir.cmake"

ACCOUNTS_SERVICES_DIR, defined in FindAccountsFileDir, is referenced
by KAccountsMacros.cmake, and these macros will cause a configure
failure in case it is not defined.

CCMAIL: nicolas.fella@gmx.de

This reverts commit 17ff746b.
parent 011dd39f
......@@ -71,3 +71,5 @@ install (FILES
${CMAKE_CURRENT_BINARY_DIR}/kaccounts_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR}/KAccounts COMPONENT Devel
)
add_subdirectory(cmake)
install(FILES FindAccountsFileDir.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR})
find_package(PkgConfig REQUIRED)
execute_process(
COMMAND "${PKG_CONFIG_EXECUTABLE}" --variable=prefix libaccounts-glib
OUTPUT_VARIABLE _pkgconfig_invoke_result
RESULT_VARIABLE _pkgconfig_failed
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if (_pkgconfig_failed)
message(FATAL_ERROR "Couldn't find the prefix for libaccounts-glib")
else()
set(ACCOUNTS_PREFIX_DIR ${_pkgconfig_invoke_result})
endif()
execute_process(
COMMAND "${PKG_CONFIG_EXECUTABLE}" --variable=providerfilesdir libaccounts-glib
OUTPUT_VARIABLE _pkgconfig_invoke_result
RESULT_VARIABLE _pkgconfig_failed
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if (_pkgconfig_failed)
message(FATAL_ERROR "Couldn't find the providerfilesdir for libaccounts-glib")
else()
if (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
string(REPLACE ${ACCOUNTS_PREFIX_DIR} ${CMAKE_INSTALL_PREFIX} _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
endif()
set(ACCOUNTS_PROVIDERS_DIR ${_pkgconfig_invoke_result})
endif()
execute_process(
COMMAND "${PKG_CONFIG_EXECUTABLE}" --variable=servicefilesdir libaccounts-glib
OUTPUT_VARIABLE _pkgconfig_invoke_result
RESULT_VARIABLE _pkgconfig_failed
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if (_pkgconfig_failed)
message(FATAL_ERROR "Couldn't find the servicefilesdir for libaccounts-glib")
else()
if (NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
string(REPLACE ${ACCOUNTS_PREFIX_DIR} ${CMAKE_INSTALL_PREFIX} _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
endif()
set(ACCOUNTS_SERVICES_DIR ${_pkgconfig_invoke_result})
endif()
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