Skip to content

Commit

Permalink
Only install anything if LIBZIP_DO_INSTALL is ON.
Browse files Browse the repository at this point in the history
Closes #458.
  • Loading branch information
0-wiz-0 committed Sep 28, 2024
1 parent 4e6f034 commit b9b76b9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,19 +477,19 @@ include(CMakePackageConfigHelpers)
write_basic_package_version_file("${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
COMPATIBILITY AnyNewerVersion)

configure_package_config_file("${PROJECT_NAME}-config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libzip)
if(LIBZIP_DO_INSTALL)
configure_package_config_file("${PROJECT_NAME}-config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libzip)

# Install Find* modules, they are required by libzip-config.cmake to resolve dependencies
install(FILES
# Install Find* modules, they are required by libzip-config.cmake to resolve dependencies
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindNettle.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Findzstd.cmake
${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindMbedTLS.cmake
DESTINATION
DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/libzip/modules
)
)

if(LIBZIP_DO_INSTALL)
# Add targets to the build-tree export set
export(TARGETS zip
FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-targets.cmake")
Expand Down

0 comments on commit b9b76b9

Please sign in to comment.