«Не удалось найти OpenSSL» при открытии GitAhead в Qt Creator - PullRequest
0 голосов
/ 30 января 2019

Я могу собрать GitAhead в «Командной строке для собственных инструментов x64 для VS2017», просто следуя README .Все, что мне нужно сделать, это:

  • Иметь CMake и ninja.exe в ПУТИ
  • Проверить проект и субмодули
  • Вв командной строке VS перейдите в каталог gitahead\build\release и дважды запустите cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=C:\dev-tools\Qt\5.12.0\msvc2017_64 ../..

Он будет завершен, и я получу GitAhead.exe.

Теперь мне стало интересно,можете открыть проект в Qt Creator.Согласно this мне просто нужно открыть CMakeLists.txt в Qt Creator.

Сначала это не сработало вообще.Методом проб и ошибок я нашел следующие переменные среды, которые я должен установить в Options> Kits> Environment:

CC=cl
CXX=cl
LIB=C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64;C:\dev-tools\VisualStudioBuildTools\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64
PATH=${PATH};C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\dev-tools\VisualStudioBuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64

(Это может быть не правильно, я не знаю, что я 'Я делаю.)

Но теперь я застрял.Теперь, когда я нажимаю «Настроить проект», я получаю:

Running "C:\dev-tools\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{7a503b92-9fbb-4075-960e-6a968505fe74}" --experimental" in C:\Users\andre\AppData\Local\Temp\QtCreator-lyJxiX\qtc-cmake-OgvZcaJK.
Starting to parse CMake project, using: "-DCMAKE_CXX_COMPILER:STRING=", "-DCMAKE_C_COMPILER:STRING=", "-DCMAKE_PREFIX_PATH:STRING=C:/dev-tools/Qt/5.12.0/msvc2017_64", "-DQT_QMAKE_EXECUTABLE:STRING=C:/dev-tools/Qt/5.12.0/msvc2017_64/bin/qmake.exe".
The C compiler identification is MSVC 19.16.27026.1
The CXX compiler identification is MSVC 19.16.27026.1
Check for working C compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
Check for working C compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.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: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
Check for working CXX compiler: C:/dev-tools/VisualStudioBuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Found Git: C:/dev-tools/Git/cmd/git.exe (found version "2.20.1.windows.1") 
CMake Warning (dev) at dep/libssh2/libssh2/CMakeLists.txt:52 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_SHARED_LIBS'.
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found version "1.1.1a")
Could NOT find Libgcrypt (missing: LIBGCRYPT_LIBRARY LIBGCRYPT_INCLUDE_DIR) 
Looking for include files windows.h, bcrypt.h
Looking for include files windows.h, bcrypt.h - not found
CMake Error at dep/libssh2/libssh2/src/CMakeLists.txt:170 (message):
  No suitable cryptography backend found.


Configuring incomplete, errors occurred!
See also "C:/Users/andre/AppData/Local/Temp/QtCreator-lyJxiX/qtc-cmake-OgvZcaJK/CMakeFiles/CMakeOutput.log".
See also "C:/Users/andre/AppData/Local/Temp/QtCreator-lyJxiX/qtc-cmake-OgvZcaJK/CMakeFiles/CMakeError.log".
CMake Project parsing failed.

Я пытался добавить

OPENSSL_ROOT_DIR=C:\dev-projects\gitahead\dep\openssl\openssl

к переменным среды, но это не имеет значения.Я понятия не имею, почему CMake может найти OpenSSL в командной строке (в командной строке VS), но не в Qt Creator.Как я могу отладить это?

...