cpp, qt: Handle modified includedir installation
* lang/cpp/src/Makefile.am, lang/qt/src/Makefile.am: Replace resolved_includedir. * lang/cpp/src/GpgmeppConfig.cmake.in.in, lang/qt/src/QGpgmeConfig.cmake.in.in: Use resolved_includedir instead of relying on a common installation prefix. -- This fixes usage of the config files in case gpgme is configured with a custom --includedir. We have to do the replacement manually like for libdir because configure would include variables in the replacement.
This commit is contained in:
parent
a6e9eefb23
commit
7302791c0d
@ -58,17 +58,11 @@ unset(_targetsDefined)
|
|||||||
unset(_targetsNotDefined)
|
unset(_targetsNotDefined)
|
||||||
unset(_expectedTargets)
|
unset(_expectedTargets)
|
||||||
|
|
||||||
# Compute the installation prefix relative to this file.
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
|
|
||||||
# Create imported target Gpgmepp
|
# Create imported target Gpgmepp
|
||||||
add_library(Gpgmepp SHARED IMPORTED)
|
add_library(Gpgmepp SHARED IMPORTED)
|
||||||
|
|
||||||
set_target_properties(Gpgmepp PROPERTIES
|
set_target_properties(Gpgmepp PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/gpgme++"
|
INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
|
||||||
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
|
INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
|
||||||
IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@"
|
IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp@libsuffix@"
|
||||||
)
|
)
|
||||||
@ -77,9 +71,6 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
|||||||
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Cleanup temporary variables.
|
|
||||||
set(_IMPORT_PREFIX)
|
|
||||||
|
|
||||||
# Loop over all imported files and verify that they actually exist
|
# Loop over all imported files and verify that they actually exist
|
||||||
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
||||||
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
||||||
|
@ -76,9 +76,9 @@ libsuffix=.so
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
GpgmeppConfig.cmake: GpgmeppConfig.cmake.in
|
GpgmeppConfig.cmake: GpgmeppConfig.cmake.in
|
||||||
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@"
|
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
|
||||||
sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2
|
sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
|
||||||
mv "$@".2 "$@"
|
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
|
||||||
|
|
||||||
install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake
|
install-cmake-files: GpgmeppConfig.cmake GpgmeppConfigVersion.cmake
|
||||||
-$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
|
-$(INSTALL) -d $(DESTDIR)$(libdir)/cmake/Gpgmepp
|
||||||
|
@ -221,9 +221,9 @@ libsuffix=.so
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
|
QGpgmeConfig.cmake: QGpgmeConfig.cmake.in
|
||||||
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" > "$@"
|
sed -e 's|[@]resolved_libdir@|$(libdir)|g' < "$<" | \
|
||||||
sed -e 's|[@]libsuffix@|$(libsuffix)|g' < "$@" > "$@".2
|
sed -e 's|[@]libsuffix@|$(libsuffix)|g' | \
|
||||||
mv "$@".2 "$@"
|
sed -e 's|[@]resolved_includedir@|$(includedir)|g' > $@
|
||||||
|
|
||||||
$(camelcase_headers): Makefile.am
|
$(camelcase_headers): Makefile.am
|
||||||
echo -n "#include \"qgpgme/" > "$@"
|
echo -n "#include \"qgpgme/" > "$@"
|
||||||
|
@ -58,17 +58,11 @@ unset(_targetsDefined)
|
|||||||
unset(_targetsNotDefined)
|
unset(_targetsNotDefined)
|
||||||
unset(_expectedTargets)
|
unset(_expectedTargets)
|
||||||
|
|
||||||
# Compute the installation prefix relative to this file.
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
||||||
|
|
||||||
# Create imported target QGpgme
|
# Create imported target QGpgme
|
||||||
add_library(QGpgme SHARED IMPORTED)
|
add_library(QGpgme SHARED IMPORTED)
|
||||||
|
|
||||||
set_target_properties(QGpgme PROPERTIES
|
set_target_properties(QGpgme PROPERTIES
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;${_IMPORT_PREFIX}/include/qgpgme"
|
INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/qgpgme;@resolved_includedir@"
|
||||||
INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core"
|
INTERFACE_LINK_LIBRARIES "Gpgmepp;Qt5::Core"
|
||||||
IMPORTED_LOCATION "@resolved_libdir@/libqgpgme@libsuffix@"
|
IMPORTED_LOCATION "@resolved_libdir@/libqgpgme@libsuffix@"
|
||||||
)
|
)
|
||||||
@ -77,9 +71,6 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
|||||||
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Cleanup temporary variables.
|
|
||||||
set(_IMPORT_PREFIX)
|
|
||||||
|
|
||||||
# Loop over all imported files and verify that they actually exist
|
# Loop over all imported files and verify that they actually exist
|
||||||
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
||||||
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
||||||
|
Loading…
Reference in New Issue
Block a user