CMake Dlibdotnet.native 构建错误
CMake Dlibdotnet.native Build Error
我在使用 cmake 构建 dlibdotnet.native 时遇到了一些问题。请帮我解决这个问题。此处错误结果。
CMake Warning (dev) at CMakeLists.txt:7 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at CMakeLists.txt:16 (add_subdirectory):
add_subdirectory given source "/dlib" which is not an existing directory.
Windows10, CMake 3.12
发现这个解决方案比 CMake GUI 更容易
Open DlibDotNet\src\DlibDotNet.Native in command prompt
Type the following code in a console:
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" ^
-DDLIB_PATH=D:/Works/Lib/DLib/19.8 ^
..
Type the following code in a console:
cmake --build . --config Release
Or
cmake --build . --config Debug
Binary files will be in build\Release or build\Debug
我在使用 cmake 构建 dlibdotnet.native 时遇到了一些问题。请帮我解决这个问题。此处错误结果。
CMake Warning (dev) at CMakeLists.txt:7 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
variables like "MSVC" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at CMakeLists.txt:16 (add_subdirectory): add_subdirectory given source "/dlib" which is not an existing directory.
Windows10, CMake 3.12
发现这个解决方案比 CMake GUI 更容易
Open DlibDotNet\src\DlibDotNet.Native in command prompt Type the following code in a console: mkdir build cd build cmake -G "Visual Studio 15 2017 Win64" ^ -DDLIB_PATH=D:/Works/Lib/DLib/19.8 ^ .. Type the following code in a console: cmake --build . --config Release Or
cmake --build . --config Debug Binary files will be in build\Release or build\Debug