CMake not able to find OpenSSL library

前端 未结 13 2001
一生所求
一生所求 2020-11-27 09:53

I am trying to install a software, which uses cmake to install itself, when i give at commandlin cmake ..
it gives me following error in this file, CMakeLists.txt -----

13条回答
  •  半阙折子戏
    2020-11-27 10:25

    you are having the FindOpenSSL.cmake file in the cmake module(path usr/shared.cmake-3.5/modules) # Search OpenSSL

     find_package(OpenSSL REQUIRED) 
    if( OpenSSL_FOUND )
        include_directories(${OPENSSL_INCLUDE_DIRS})
        link_directories(${OPENSSL_LIBRARIES})
        message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
    
    target_link_libraries(project_name /path/of/libssl.so /path/of/libcrypto.so)
    

提交回复
热议问题