Could NOT find OpenSSL (build for iOS)
Run the command:
cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DNATS_BUILD_STREAMING=OFF -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON
The library is successfully found:
-- Found OpenSSL: /usr/local/opt/openssl@1.1/lib/libcrypto.dylib (found version "1.1.1c") -- Configuring done -- Generating done
But when I try to build for iOS:
cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DNATS_BUILD_STREAMING=OFF -DNATS_BUILD_TLS_USE_OPENSSL_1_1_API=ON -G Xcode -DCMAKE_TOOLCHAIN_FILE=~/ios.toolchain.cmake -DPLATFORM=OS64COMBINED
I get an error:
CMake Error at /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindOpenSSL.cmake:413 (find_package_handle_standard_args) CMakeLists.txt:44 (find_package) -- Configuring incomplete, errors occurred!
This is my first experience with cmake. Maybe I'm doing something wrong?