pkgconfig_fix.patch 1.5 KB

12345678910111213141516171819202122
  1. --- a/expat/CMakeLists.txt
  2. +++ b/expat/CMakeLists.txt
  3. @@ -469,7 +469,7 @@ if(WIN32 AND NOT MINGW)
  4. # Everything but MSVC is already adding prefix "lib", automatically.
  5. # NOTE: "set_property(TARGET expat PROPERTY PREFIX lib)" would only affect *.dll
  6. # files but not *.lib files, so we have to rely on property OUTPUT_NAME, instead.
  7. - # Property CMAKE_*_POSTFIX still applies.
  8. + # Property EXPAT_*_POSTFIX still applies.
  9. set(_EXPAT_OUTPUT_NAME libexpat)
  10. set_property(TARGET expat PROPERTY OUTPUT_NAME ${_EXPAT_OUTPUT_NAME})
  11. else()
  12. @@ -520,8 +520,8 @@ if(EXPAT_BUILD_PKGCONFIG)
  13. foreach(_build_type ${CMAKE_BUILD_TYPE} Debug Release RelWithDebInfo MinSizeRel)
  14. string(TOLOWER "${_build_type}" _build_type_lower)
  15. string(TOUPPER "${_build_type}" _build_type_upper)
  16. - set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${CMAKE_${_build_type_upper}_POSTFIX}")
  17. - set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${CMAKE_${_build_type_upper}_POSTFIX}")
  18. + set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_name" "expat${EXPAT_${_build_type_upper}_POSTFIX}")
  19. + set_property(TARGET expat PROPERTY "pkgconfig_${_build_type_lower}_output_name" "${_EXPAT_OUTPUT_NAME}${EXPAT_${_build_type_upper}_POSTFIX}")
  20. if(_EXPAT_LIBM_FOUND)
  21. set_property(TARGET expat PROPERTY "pkgconfig_libm" "-lm")
  22. else()