If you OpenSSL is installed with different triplet or location, please update the command line accordingly. The above command line tells CMake that OpenSSL root folder is in the above directory. DOPENSSL_ROOT_DIR="C:/vcpkg/installed/圆4-windows-static" ![]() Thus to fix this issue, I just need to change the command line to the following: cmake. In my system, OpenSSL is installed via vcpkg and installation folder is: C:/vcpkg/installed/圆4-windows-static. The error will occur as the following screenshot shows: Create file CMakeLists.txt in the project folder with the following content:.C:\hdp\cmaketest>openssl versionįollow the steps below can reproduce this issue. ![]() OpenSSL is installed on Windows using Microsoft vcpkg (a package manager for C++). Microsoft Visual C++ version MSVC 6.0 OpenSSL version C:\hdp\cmaketest>cmake -versionĬMake suite maintained and supported by Kitware (/cmake). The CXX compiler identification is MSVC 6.0ĬMake version is 3.18.0. The C compiler identification is MSVC 6.0 Selecting Windows SDK version 2.0 to target Windows 3. The following is my environment setup: - Building for: Visual Studio 16 2019 This error was raised by the following line in CMakeLists.txt: find_package(OpenSSL REQUIRED) ![]() System variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY For this case, it was built under the Debug configuration type, so it would be located in the build/Debug folder (remember the build folder we specified earlier?).When I was building Hadoop 3.3.0 on Windows 10, I hit one error about OpenSSL: CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):Ĭould NOT find OpenSSL, try to set the path to OpenSSL root folder in the exe file should now be compiled and ready to run. The project can then be built through the IDE. This will open the default IDE or some other configured environment to open your project. This tutorial, and projects in this class, will just use the default settings that display no need to change anything.Ĭlick open project. The red highlights will display the optional cmake flags that are listed in the CMakeLists.txt (optional files to build), the configuration types, and CMAKE_INSTALL_PREFIX, where the default final. Here, MSVC 2017 will be used, which will generate project files for Visual Studios. You can customize the preferred compiler depending on the computer and program files, there may be 圆4 alternative compilers listed as well. CMake project files (such as CMakeLists.txt) are consumed directly by Visual Studio for the purposes of IntelliSense and browsing. This will read the CMakeLists.txt files, and configure the project for the correct compiler. Visual Studio's native support for CMake enables you to edit, build, and debug CMake projects on Windows, the Windows Subsystem for Linux (WSL), and remote systems from the same instance of Visual Studio. The build folder will also include our executable files once built, so remember where this is! Locate the corresponding folders for the project: The source directory should be the one corresponding to the git directory pulled (make sure that the source directory contains a CMakeLists.txt file!) The build folder, if not already created, can be added by you it acts as a way of separating the binary files compiled from the source code). There are two paths that are required for cmake to configure and generate projects, the source code directory and build directory. ![]() The following window should display upon opening CMake-gui. If one chooses, some alternatives can include MinGW or Cygwin in this tutorial instead, one recommended method of building assignments will be through the cmake-gui: CMake-gui Download, and using Visual Studios 2017, installed with Visual C++ Support. For Windows, cmake and make compatibilities especially can be more involved, as gcc and such compilers do not come packaged with the OS.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |