Skip to content

Commit

Permalink
now correctly exporting dependencies of libxml2
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Wirtz committed Jun 11, 2015
1 parent 1666703 commit 10f0feb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,16 @@ install(EXPORT libxml2-config DESTINATION ${PACKAGE_CONFIG_DIR})
include(CMakePackageConfigHelpers)
WRITE_BASIC_PACKAGE_VERSION_FILE(${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake
COMPATIBILITY AnyNewerVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake DESTINATION ${PACKAGE_CONFIG_DIR})
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-dependencies.cmake
"include(CMakeFindDependencyMacro)\r\n"
"set(_OLD_IMPORT_PREFIX \${_IMPORT_PREFIX})\r\n")
if (WITH_ZLIB)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-dependencies.cmake "find_dependency(ZLIB ${ZLIB_VERSION})\r\n")
endif()
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-dependencies.cmake "set(_IMPORT_PREFIX \${_OLD_IMPORT_PREFIX})")
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake
${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-dependencies.cmake
DESTINATION ${PACKAGE_CONFIG_DIR})


0 comments on commit 10f0feb

Please sign in to comment.