View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011035CMakeModulespublic2010-07-24 01:252010-09-10 00:11
ReporterYi Yang 
Assigned ToMathieu Malaterre 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0011035: FindOpenSSL broken
DescriptionThe following code
    FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd libeay32
      ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD libeay32
      ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssleay32 ssl
      ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssleay32 ssl
      ${OPENSSL_ROOT_DIR}/lib/VC
      )
should be changed to
    FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd libeay32
      PATHS ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD libeay32
      PATHS ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssleay32 ssl
      PATHS ${OPENSSL_ROOT_DIR}/lib/VC
      )
    FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssleay32 ssl
      PATHS ${OPENSSL_ROOT_DIR}/lib/VC
      )
TagsNo tags attached.
Attached Filespatch file icon FindOpenSSL-2.8.2_paths-missing.patch [^] (2,185 bytes) 2010-07-25 16:08 [Show Content]

 Relationships

  Notes
(0021473)
Droscy (reporter)
2010-07-25 16:08

Yes, probably the PATHS keyword is missing.
I've attached a patch that also adds the possibility to set a custom OPENSSL_ROOT_DIR from the system.
(0021750)
Dimitri Kaparis (reporter)
2010-08-14 05:11

Further down, the debug/release library configuration selections are messed up. The code:


    if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
      set( OPENSSL_LIBRARIES
        optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE}
        debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG}
        )

should be changed to:

    if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
      set( OPENSSL_LIBRARIES
        optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}
        optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}
        )

I have incorporated both fixes, and bundled the fixed FindOpenSSL module into another project. It is available here: http://bitbucket.org/dkaparis/bitcoin-cmake/src/tip/cmake/FindOpenSSL.cmake [^]
(0021751)
Mathieu Malaterre (developer)
2010-08-14 07:10

I believe this is already fixed by:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca5c5221b71c6767175348c0d9a6ec6012d9dfe6 [^]

Closing bug, please reopen if I miss anything. Thanks.
(0021752)
Mathieu Malaterre (developer)
2010-08-14 07:10

Fixed in cmake 2.8.3 (after 2.8.2)
(0021753)
Mathieu Malaterre (developer)
2010-08-14 07:20

I have also added the suggestion for debug/optimized:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d570ee7b5a6c1ea69d19af1ac2269af0287d6953 [^]

Thanks !

 Issue History
Date Modified Username Field Change
2010-07-24 01:25 Yi Yang New Issue
2010-07-25 16:08 Droscy Note Added: 0021473
2010-07-25 16:08 Droscy File Added: FindOpenSSL-2.8.2_paths-missing.patch
2010-08-14 05:11 Dimitri Kaparis Note Added: 0021750
2010-08-14 07:10 Mathieu Malaterre Note Added: 0021751
2010-08-14 07:10 Mathieu Malaterre Status new => assigned
2010-08-14 07:10 Mathieu Malaterre Assigned To => Mathieu Malaterre
2010-08-14 07:10 Mathieu Malaterre Note Added: 0021752
2010-08-14 07:10 Mathieu Malaterre Status assigned => closed
2010-08-14 07:10 Mathieu Malaterre Resolution open => fixed
2010-08-14 07:20 Mathieu Malaterre Note Added: 0021753
2010-08-14 07:20 Mathieu Malaterre Status closed => assigned
2010-08-14 07:20 Mathieu Malaterre Status assigned => closed
2010-09-10 00:11 David Cole Fixed in Version => CMake 2.8.3
2010-09-10 00:11 David Cole Target Version => CMake 2.8.3


Copyright © 2000 - 2018 MantisBT Team