cmake - osx/mac - openssl brew

后端 未结 4 1411
独厮守ぢ
独厮守ぢ 2021-02-06 00:24

I am using the following cmake commands

# Search OpenSSL
find_package(PkgConfig REQUIRED)
pkg_search_module(OPENSSL REQUIRED openssl)

if( OPENSSL_FOUND )

    in         


        
4条回答
  •  被撕碎了的回忆
    2021-02-06 01:00

    The cause of this issue is a bug in CMake -- it does not use alternate pkg-config paths correctly.

    According to the merge request attached to the bug, the fix should be in cmake 3.17.0 (to be released in Feb 2020).

    Otherwise, use this work-around. Hard coding it in your CMakeLists.txt will make things bad for people who use MacPorts instead of Homebrew.

提交回复
热议问题