aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim B <d3x0r@users.noreply.github.com>2024-04-06 12:17:32 -0700
committerGitHub <noreply@github.com>2024-04-06 12:17:32 -0700
commit9f64e1d14d81d6cf0a5b837731c7c6cd5d31332a (patch)
tree9c2c36bcb09ecac70d5b3f1c1e48334524eddbe6
parent7362be429ccf7c8381cc3e7f91c1a57ff1a11f7f (diff)
downloadportable-9f64e1d14d81d6cf0a5b837731c7c6cd5d31332a.tar.gz
portable-9f64e1d14d81d6cf0a5b837731c7c6cd5d31332a.tar.bz2
portable-9f64e1d14d81d6cf0a5b837731c7c6cd5d31332a.zip
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)
-rw-r--r--CMakeLists.txt22
1 files 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)
509 "${CMAKE_CURRENT_BINARY_DIR}/LibreSSLConfigVersion.cmake" 509 "${CMAKE_CURRENT_BINARY_DIR}/LibreSSLConfigVersion.cmake"
510 DESTINATION "${LIBRESSL_INSTALL_CMAKEDIR}" 510 DESTINATION "${LIBRESSL_INSTALL_CMAKEDIR}"
511 ) 511 )
512endif()
513 512
514if(ENABLE_LIBRESSL_INSTALL)
515 if(NOT MSVC) 513 if(NOT MSVC)
516 # Create pkgconfig files. 514 # Create pkgconfig files.
517 set(prefix ${CMAKE_INSTALL_PREFIX}) 515 set(prefix ${CMAKE_INSTALL_PREFIX})
@@ -530,19 +528,17 @@ if(ENABLE_LIBRESSL_INSTALL)
530 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig 528 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig
531 DESTINATION ${CMAKE_INSTALL_LIBDIR}) 529 DESTINATION ${CMAKE_INSTALL_LIBDIR})
532 endif() 530 endif()
533endif(ENABLE_LIBRESSL_INSTALL)
534 531
535if(ENABLE_LIBRESSL_INSTALL)
536 install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR}) 532 install(FILES cert.pem openssl.cnf x509v3.cnf DESTINATION ${CONF_DIR})
537 install(DIRECTORY DESTINATION ${CONF_DIR}/certs) 533 install(DIRECTORY DESTINATION ${CONF_DIR}/certs)
538endif(ENABLE_LIBRESSL_INSTALL)
539 534
540if(NOT TARGET uninstall) 535 if(NOT TARGET uninstall)
541 configure_file( 536 configure_file(
542 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" 537 "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
543 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" 538 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
544 IMMEDIATE @ONLY) 539 IMMEDIATE @ONLY)
545 540
546 add_custom_target(uninstall 541 add_custom_target(uninstall
547 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) 542 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
548endif() 543 endif()
544endif(ENABLE_LIBRESSL_INSTALL)