diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2021-12-31 20:35:25 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2021-12-31 20:49:00 +0100 |
commit | 2ed8e19ada265a523b35f78c7ff13858a22f15d0 (patch) | |
tree | 02df257d8b4f97fa418ee3a9c9050ab7b4fda25a | |
parent | 60bbbe560cb50e6bfbf93ed765aaeb38335487c3 (diff) | |
download | libexpat-git-2ed8e19ada265a523b35f78c7ff13858a22f15d0.tar.gz |
CMake: Make call to file(GENERATE [..]) work for CMake <3.19cmake-fix-call-to-file-generate
Error from CMake 3.7.2 was:
CMake Error at CMakeLists.txt:482 (file):
file Incorrect arguments to GENERATE subcommand.
-rw-r--r-- | expat/CMakeLists.txt | 3 | ||||
-rw-r--r-- | expat/Changes | 1 | ||||
-rw-r--r-- | expat/expat.pc.cmake | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index ab3b8d8c..3edc70c8 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -481,8 +481,7 @@ if(EXPAT_BUILD_PKGCONFIG) file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/expat.pc - INPUT ${PROJECT_SOURCE_DIR}/expat.pc.cmake - TARGET expat) + INPUT ${PROJECT_SOURCE_DIR}/expat.pc.cmake) expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() diff --git a/expat/Changes b/expat/Changes index 51cbaa2d..45334300 100644 --- a/expat/Changes +++ b/expat/Changes @@ -4,6 +4,7 @@ NOTE: We are looking for help with a few things: Release x.x.x xxx xxxxxxxx xx xxxx Other changes: + #535 CMake: Make call to file(GENERATE [..]) work for CMake <3.19 #527 #528 Address compiler warnings Release 2.4.2 Sun December 19 2021 diff --git a/expat/expat.pc.cmake b/expat/expat.pc.cmake index 948e35ff..fa2291a1 100644 --- a/expat/expat.pc.cmake +++ b/expat/expat.pc.cmake @@ -1,11 +1,11 @@ -prefix=$<TARGET_PROPERTY:pkgconfig_prefix> -exec_prefix=$<TARGET_PROPERTY:pkgconfig_exec_prefix> -libdir=$<TARGET_PROPERTY:pkgconfig_libdir> -includedir=$<TARGET_PROPERTY:pkgconfig_includedir> +prefix=$<TARGET_PROPERTY:expat,pkgconfig_prefix> +exec_prefix=$<TARGET_PROPERTY:expat,pkgconfig_exec_prefix> +libdir=$<TARGET_PROPERTY:expat,pkgconfig_libdir> +includedir=$<TARGET_PROPERTY:expat,pkgconfig_includedir> -Name: $<TARGET_PROPERTY:pkgconfig_$<LOWER_CASE:$<CONFIG>>_name> -Version: $<TARGET_PROPERTY:pkgconfig_version> +Name: $<TARGET_PROPERTY:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_name> +Version: $<TARGET_PROPERTY:expat,pkgconfig_version> Description: expat XML parser URL: https://libexpat.github.io/ -Libs: -L${libdir} -l$<TARGET_PROPERTY:pkgconfig_$<LOWER_CASE:$<CONFIG>>_name> $<TARGET_PROPERTY:pkgconfig_libm> +Libs: -L${libdir} -l$<TARGET_PROPERTY:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_name> $<TARGET_PROPERTY:expat,pkgconfig_libm> Cflags: -I${includedir} |