用cmake查找openssl库

时间:2019-12-21 20:05:12

标签: windows cmake openssl mingw-w64

我尝试了几种改编,在Windows 10下编译了monero,但仍与mingw64一起收到以下编译错误消息。 openssl已安装在mingw64下。 mingw64环境是最新的。

# make release-static-win64
mkdir -p build/"MINGW64_NT-10.0-18362/master"/release
cd build/"MINGW64_NT-10.0-18362/master"/release && cmake -G "MSYS Makefiles" -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=../../../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../../../.. && make
-- Found PythonInterp: D:/apps/msys64/mingw64/bin/python.exe (found version "3.8")
-- CMake version 3.15.5
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: D:/apps/msys64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: D:/apps/msys64/mingw64/bin/x86_64-w64-mingw32-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: D:/apps/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe
-- Check for working CXX compiler: D:/apps/msys64/mingw64/bin/x86_64-w64-mingw32-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: D:/apps/msys64/mingw64/bin/x86_64-w64-mingw32-gcc.exe
-- Building build tag win-x64
-- Found Git: D:/apps/msys64/usr/bin/git.exe (found version "2.24.1")
-- Checking submodules
-- Submodule 'external/miniupnp' is up-to-date
-- Submodule 'external/unbound' is up-to-date
-- Submodule 'external/rapidjson' is up-to-date
-- Submodule 'external/trezor-common' is up-to-date
-- Submodule 'external/randomx' is up-to-date
-- Could not find DEVELOPER_LOCAL_TOOLS in env (not required)
-- BOOST_IGNORE_SYSTEM_PATHS defaults to OFF
-- Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)
-- Building for a 64-bit system
-- Building internal libraries as static
-- MSYS location: D:/apps
-- Using LMDB as default DB type
-- looking for liblzma
-- Could not find libunwind (missing: LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES)
-- Stack trace on exception disabled
CMake Error at D:/apps/msys64/mingw64/share/cmake-3.15/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):
  D:/apps/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  D:/apps/msys64/mingw64/share/cmake-3.15/Modules/FindOpenSSL.cmake:413 (find_package_handle_standard_args)
  CMakeLists.txt:400 (find_package)

任何想法如何解决?

0 个答案:

没有答案