View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007172CMakeModulespublic2008-06-06 13:002012-01-04 16:18
ReporterZhang Le 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007172: FindOpenSSL better use FindPkgConfig so that -Wl,--as-needed linking failure would be avoided
DescriptionGnu linker ld's --as-needed option has many advantages.
Please check "How can --as-needed be useful?" section on this page:
http://www.gentoo.org/proj/en/qa/asneeded.xml [^]

However if the build system can't find the actual needed libs, linking will failed when --as-needed is used.

Using pkg-config to find the libs would be a good idea. And thus this patch:

--- /usr/share/cmake/Modules/FindOpenSSL.cmake 2008-06-07 00:20:26.000000000 +0800
+++ home/FindOpenSSL.cmake 2008-06-07 00:57:48.000000000 +0800
@@ -46,7 +46,8 @@
    MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE)
 ELSE(WIN32 AND MSVC)
 
- FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD )
+ INCLUDE( FindPkgConfig )
+ pkg_search_module(OPENSSL "openssl")
 
 ENDIF(WIN32 AND MSVC)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0028180)
Alex Neundorf (developer)
2012-01-04 16:18

FindOpenSSL.cmake uses pkg-config in the meantime (since March 2011, which should be in cmake 2.8.5).

So I'm closing this one.

Alex

 Issue History
Date Modified Username Field Change
2008-06-06 13:00 Zhang Le New Issue
2008-08-19 16:41 Bill Hoffman Status new => assigned
2008-08-19 16:41 Bill Hoffman Assigned To => Alex Neundorf
2009-01-10 08:51 Alex Neundorf Category CMake => Modules
2012-01-04 16:18 Alex Neundorf Note Added: 0028180
2012-01-04 16:18 Alex Neundorf Status assigned => closed
2012-01-04 16:18 Alex Neundorf Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team