Changeset 2334

Show
Ignore:
Timestamp:
01/28/08 21:33:38 (11 months ago)
Author:
edmanm
Message:

Add some CMake fu to find the right OpenSSL libs, based on the
FindOpenSSL.cmake module from the CMake distribution. We still need
some more CMake fu to poke at the chosen Qt build to see if OpenSSL
libs are needed or not, but this should work in the common case.

Location:
vidalia/trunk
Files:
2 added
2 modified

Legend:

Unmodified
Added
Removed
  • vidalia/trunk/CMakeLists.txt

    r2327 r2334  
    6868## Check for QSslSocket 
    6969check_include_file_cxx("qsslsocket.h" HAVE_QSSLSOCKET_H) 
    70 if(HAVE_QSSLSOCKET_H) 
     70if (HAVE_QSSLSOCKET_H) 
    7171  check_symbol_exists(QT_NO_OPENSSL "QtGlobal" QT_NO_SSL_SUPPORT) 
    72   if(NOT QT_NO_SSL_SUPPORT) 
     72  if (NOT QT_NO_SSL_SUPPORT) 
    7373    option(USE_QSSLSOCKET "Use Qt's QSslSocket for GeoIP lookups." ON) 
    7474  endif(NOT QT_NO_SSL_SUPPORT) 
    7575endif(HAVE_QSSLSOCKET_H) 
     76if (USE_QSSLSOCKET) 
     77  if (MSVC OR UNIX) 
     78    include(${CMAKE_SOURCE_DIR}/cmake/FindOpenSSL.cmake) 
     79  endif(MSVC OR UNIX) 
     80endif(USE_QSSLSOCKET) 
    7681 
    7782## Write out a configuration file 
     
    8792add_subdirectory(pkg) 
    8893 
    89 ## The 'confclean' target removes cached CMake configuration information 
    90 if (WIN32) 
    91   set(RM_CMD del) 
    92 else (WIN32) 
    93   set(RM_CMD rm) 
    94 endif(WIN32) 
    95 add_custom_target(confclean ${RM_CMD} CMakeCache.txt) 
    96  
  • vidalia/trunk/src/util/CMakeLists.txt

    r2323 r2334  
    5252target_link_libraries(util ${QT_LIBRARIES}) 
    5353 
    54 if(USE_QSSLSOCKET) 
    55   target_link_libraries(util) 
    56   if(UNIX) 
    57     ## XXX: This is not quite right, since we still may need to link in 
    58     ##      OpenSSL libs on Windows as well, depending on how Qt was built. 
    59     ##      It suffices for the default Qt install on Windows though, until we 
    60     ##      gets some more complex CMake fu in. 
    61     target_link_libraries(util crypto ssl) 
    62   endif(UNIX) 
    63 endif(USE_QSSLSOCKET) 
     54if(USE_QSSLSOCKET AND OPENSSL_LIBRARIES) 
     55  target_link_libraries(util ${OPENSSL_LIBRARIES}) 
     56endif(USE_QSSLSOCKET AND OPENSSL_LIBRARIES) 
    6457