From 0b68316b3f6aa7c04771e9c57bffc904ce2dd148 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 14 Feb 2018 16:41:40 -0700 Subject: [PATCH] CMake: Migrate OpenSSL detection to Package.cmake --- dtool/Config.cmake | 11 ----------- dtool/LocalSetup.cmake | 6 ------ dtool/Package.cmake | 26 +++++++++++++++++++++++++- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/dtool/Config.cmake b/dtool/Config.cmake index af5ebf81e1..8932cef6b6 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -487,17 +487,6 @@ without having to reinstall), comment out this definition and put your source directory on your PYTHONPATH.") -# Is OpenSSL installed, and where? -find_package(OpenSSL COMPONENTS ssl crypto QUIET) - -package_option(OPENSSL DEFAULT ON - "Enable OpenSSL support") - -option(REPORT_OPENSSL_ERRORS - "Define this true to include the OpenSSL code to report verbose -error messages when they occur." ${IS_DEBUG_BUILD}) - - # Is libjpeg installed, and where? find_package(JPEG QUIET) diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake index 854de90914..5d2f4280e9 100644 --- a/dtool/LocalSetup.cmake +++ b/dtool/LocalSetup.cmake @@ -190,12 +190,6 @@ endif() # Now go through all the packages and report whether we have them. show_packages() -if(HAVE_OPENSSL) - message("+ OpenSSL") -else() - message("- Did not find OpenSSL") -endif() - if(HAVE_JPEG) message("+ libjpeg") else() diff --git a/dtool/Package.cmake b/dtool/Package.cmake index 7ab874cf8a..a5561ea7db 100644 --- a/dtool/Package.cmake +++ b/dtool/Package.cmake @@ -1,8 +1,12 @@ -# Eigen +# +# ------------ Eigen ------------ +# find_package(Eigen3 QUIET) + if(Eigen3_FOUND) set(EIGEN_FOUND ON) endif() + package_option(EIGEN "Enables experimental support for the Eigen linear algebra library. If this is provided, Panda will use this library as the fundamental @@ -11,17 +15,37 @@ its own internal implementation. The primary advantage of using Eigen is SSE2 support, which is only activated if LINMATH_ALIGN is also enabled." LICENSE "MPL-2") + option(LINMATH_ALIGN "This is required for activating SSE2 support using Eigen. Activating this does constrain most objects in Panda to 16-byte alignment, which could impact memory usage on very-low-memory platforms. Currently experimental." ON) + if(LINMATH_ALIGN) config_package(EIGEN "Eigen linear algebra library" "vectorization enabled in build") else() config_package(EIGEN "Eigen linear algebra library" "vectorization NOT enabled in build") endif() +# +# ------------ OpenSSL ------------ +# +find_package(OpenSSL COMPONENTS ssl crypto QUIET) + +package_option(OPENSSL DEFAULT ON + "Enable OpenSSL support") + +option(REPORT_OPENSSL_ERRORS + "Define this true to include the OpenSSL code to report verbose +error messages when they occur." ${IS_DEBUG_BUILD}) + +if(REPORT_OPENSSL_ERRORS) + config_package(OPENSSL "OpenSSL" "with verbose error reporting") +else() + config_package(OPENSSL "OpenSSL") +endif() + # Find and configure Miles Sound System find_package(Miles QUIET) #config_package(RAD_MSS "Miles Sound System")