1
0

fix-export-targets.patch 734 B

1234567891011121314151617
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 3931f12..b570fa8 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -909,6 +909,12 @@ endif()
  6. # Create an export file that CMake users can include() to import our targets.
  7. if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
  8. install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
  9. + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" "
  10. +include(CMakeFindDependencyMacro)
  11. +find_dependency(ZLIB)
  12. +include(\"\${CMAKE_CURRENT_LIST_DIR}/lib${PNG_LIB_NAME}.cmake\")
  13. +")
  14. + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/libpng")
  15. endif()
  16. # what's with libpng-manual.txt and all the extra files?