From 9f64e1d14d81d6cf0a5b837731c7c6cd5d31332a Mon Sep 17 00:00:00 2001 From: Jim B Date: Sat, 6 Apr 2024 12:17:32 -0700 Subject: Update CMakeLists.txt Collapse the same if condition blocks into one block. Include the uninstall rule when building install rules; if there was no install, shouldn't need uninstall (for this build; a previous build that was installed would have an uninstall rule) --- CMakeLists.txt | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01a42fb..28e184d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,9 +509,7 @@ if(ENABLE_LIBRESSL_INSTALL) "${CMAKE_CURRENT_BINARY_DIR}/LibreSSLConfigVersion.cmake" DESTINATION "${LIBRESSL_INSTALL_CMAKEDIR}" ) -endif() -if(ENABLE_LIBRESSL_INSTALL) if(NOT MSVC) # Create pkgconfig files. set(prefix ${CMAKE_INSTALL_PREFIX}) @@ -530,19 +528,17 @@ if(ENABLE_LIBRESSL_INSTALL) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -endif(ENABLE_LIBRESSL_INSTALL) -if(ENABLE_LIBRESSL_INSTALL) install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) install(DIRECTORY DESTINATION ${CONF_DIR}/certs) -endif(ENABLE_LIBRESSL_INSTALL) -if(NOT TARGET uninstall) - configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) + if(NOT TARGET uninstall) + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) - add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -endif() + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() +endif(ENABLE_LIBRESSL_INSTALL) -- cgit v1.2.3-55-g6feb