summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2022-03-28 15:52:03 +0200
committerGitHub <noreply@github.com>2022-03-28 15:52:03 +0200
commitf1fd4b6d4a68a8128b46af77c139c69263693caa (patch)
tree16a2df9894be379c85065af90e2f60635f218d20
parent011c4b5a5c53c38aaa3595c3a8a2b0f887668b48 (diff)
parentcbd4807ea659e331b9303de463fec486e0eeb1e2 (diff)
downloadlibexpat-git-f1fd4b6d4a68a8128b46af77c139c69263693caa.tar.gz
Merge pull request #587 from libexpat/fix-pkg-config
Fix pkg-config files
-rw-r--r--expat/CMakeLists.txt6
-rw-r--r--expat/Changes3
-rw-r--r--expat/expat.pc.cmake3
-rw-r--r--expat/expat.pc.in3
4 files changed, 12 insertions, 3 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
index ce69a278..ef0890f3 100644
--- a/expat/CMakeLists.txt
+++ b/expat/CMakeLists.txt
@@ -442,7 +442,10 @@ if(WIN32 AND NOT MINGW)
# NOTE: "set_property(TARGET expat PROPERTY PREFIX lib)" would only affect *.dll
# files but not *.lib files, so we have to rely on property OUTPUT_NAME, instead.
# Property CMAKE_*_POSTFIX still applies.
- set_property(TARGET expat PROPERTY OUTPUT_NAME libexpat)
+ set(_EXPAT_OUTPUT_NAME libexpat)
+ set_property(TARGET expat PROPERTY OUTPUT_NAME ${_EXPAT_OUTPUT_NAME})
+else()
+ set(_EXPAT_OUTPUT_NAME expat)
endif()
target_include_directories(expat
@@ -494,6 +497,7 @@ if(EXPAT_BUILD_PKGCONFIG)
string(TOLOWER "${_build_type}" _build_type_lower)
string(TOUPPER "${_build_type}" _build_type_upper)
set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${CMAKE_${_build_type_upper}_POSTFIX}")
+ set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${CMAKE_${_build_type_upper}_POSTFIX}")
if(_EXPAT_LIBM_FOUND)
set_property(TARGET expat PROPERTY "pkgconfig_libm" "-lm")
else()
diff --git a/expat/Changes b/expat/Changes
index cdca767a..6cfd4ed5 100644
--- a/expat/Changes
+++ b/expat/Changes
@@ -4,6 +4,8 @@ NOTE: We are looking for help with a few things:
Release x.x.x xxx xxxx xx xxxx
Other changes:
+ #587 pkg-config: Move "-lm" to section "Libs.private"
+ #587 CMake|MSVC: Fix pkg-config section "Libs"
#55 #582 CMake|macOS: Start using linker arguments
"-compatibility_version <version>" and
"-current_version <version>" in a way compatible with
@@ -14,6 +16,7 @@ Release x.x.x xxx xxxx xx xxxx
Special thanks to:
evpobr
+ Kai Pastor
Sam James
Release 2.4.7 Fri March 4 2022
diff --git a/expat/expat.pc.cmake b/expat/expat.pc.cmake
index fa2291a1..da7a0549 100644
--- a/expat/expat.pc.cmake
+++ b/expat/expat.pc.cmake
@@ -7,5 +7,6 @@ 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:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_name> $<TARGET_PROPERTY:expat,pkgconfig_libm>
+Libs: -L${libdir} -l$<TARGET_PROPERTY:expat,pkgconfig_$<LOWER_CASE:$<CONFIG>>_output_name>
+Libs.private: $<TARGET_PROPERTY:expat,pkgconfig_libm>
Cflags: -I${includedir}
diff --git a/expat/expat.pc.in b/expat/expat.pc.in
index 6be6465a..db080653 100644
--- a/expat/expat.pc.in
+++ b/expat/expat.pc.in
@@ -7,5 +7,6 @@ Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Description: expat XML parser
URL: https://libexpat.github.io/
-Libs: -L${libdir} -l@PACKAGE_NAME@ @LIBM@
+Libs: -L${libdir} -l@PACKAGE_NAME@
+Libs.private: @LIBM@
Cflags: -I${includedir}