From 43142f0babc617123bccd2f516223c90ca9e6dbc Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Thu, 20 May 2021 16:07:03 +0200 Subject: [PATCH] cmake/autotools: Fix generated expat-noconfig.cmake for macOS and MinGW --- expat/Makefile.am | 3 +++ ...make.in => expat-noconfig__linux.cmake.in} | 0 .../autotools/expat-noconfig__macos.cmake.in | 19 +++++++++++++++++++ .../expat-noconfig__windows.cmake.in | 19 +++++++++++++++++++ expat/configure.ac | 6 +++++- 5 files changed, 46 insertions(+), 1 deletion(-) rename expat/cmake/autotools/{expat-noconfig.cmake.in => expat-noconfig__linux.cmake.in} (100%) create mode 100644 expat/cmake/autotools/expat-noconfig__macos.cmake.in create mode 100644 expat/cmake/autotools/expat-noconfig__windows.cmake.in diff --git a/expat/Makefile.am b/expat/Makefile.am index 49d157aa..6847d083 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -66,6 +66,9 @@ cmakedir = $(libdir)/cmake/expat-@PACKAGE_VERSION@ _EXTRA_DIST_CMAKE = \ + cmake/autotools/expat-noconfig__linux.cmake.in \ + cmake/autotools/expat-noconfig__macos.cmake.in \ + cmake/autotools/expat-noconfig__windows.cmake.in \ cmake/autotools/expat-package-init.cmake \ cmake/mingw-toolchain.cmake \ \ diff --git a/expat/cmake/autotools/expat-noconfig.cmake.in b/expat/cmake/autotools/expat-noconfig__linux.cmake.in similarity index 100% rename from expat/cmake/autotools/expat-noconfig.cmake.in rename to expat/cmake/autotools/expat-noconfig__linux.cmake.in diff --git a/expat/cmake/autotools/expat-noconfig__macos.cmake.in b/expat/cmake/autotools/expat-noconfig__macos.cmake.in new file mode 100644 index 00000000..b6b1016c --- /dev/null +++ b/expat/cmake/autotools/expat-noconfig__macos.cmake.in @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "expat::expat" for configuration "" +set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(expat::expat PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" + IMPORTED_SONAME_NOCONFIG "@rpath/libexpat.@SO_MAJOR@.dylib" + ) + +list(APPEND _IMPORT_CHECK_TARGETS expat::expat ) +list(APPEND _IMPORT_CHECK_FILES_FOR_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.@SO_MAJOR@.@SO_MINOR@.@SO_PATCH@.dylib" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/expat/cmake/autotools/expat-noconfig__windows.cmake.in b/expat/cmake/autotools/expat-noconfig__windows.cmake.in new file mode 100644 index 00000000..66b2f5cb --- /dev/null +++ b/expat/cmake/autotools/expat-noconfig__windows.cmake.in @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "expat::expat" for configuration "" +set_property(TARGET expat::expat APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(expat::expat PROPERTIES + IMPORTED_IMPLIB_NOCONFIG "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.dll.a" + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/bin/libexpat-@SO_MAJOR@.dll" + ) + +list(APPEND _IMPORT_CHECK_TARGETS expat::expat ) +list(APPEND _IMPORT_CHECK_FILES_FOR_expat::expat "${_IMPORT_PREFIX}/@LIBDIR_BASENAME@/libexpat.dll.a" "${_IMPORT_PREFIX}/bin/libexpat-@SO_MAJOR@.dll" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/expat/configure.ac b/expat/configure.ac index 6ba69a2e..84319d64 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -397,11 +397,15 @@ AC_SUBST([AM_LDFLAGS]) dnl updating _EXPAT_OUTPUT_NAME variable to effect the package name in expat.pc file (issue #361) AC_SUBST(_EXPAT_OUTPUT_NAME, ["$PACKAGE_NAME"]) +AS_CASE("${host_os}", + [darwin*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__macos.cmake.in], + [mingw*], [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__windows.cmake.in], + [CMAKE_NOCONFIG_SOURCE=cmake/autotools/expat-noconfig__linux.cmake.in]) AC_CONFIG_FILES([Makefile] [expat.pc] [cmake/expat-config.cmake] [cmake/autotools/expat-config-version.cmake] - [cmake/autotools/expat-noconfig.cmake] + [cmake/autotools/expat-noconfig.cmake:${CMAKE_NOCONFIG_SOURCE}] [doc/Makefile] [examples/Makefile] [lib/Makefile]