GDAL 的 CMake 工具不接受 PROJ 6.3.2,尽管需要 6.0+?

问题描述 投票:0回答:1

期望:使用 cmake 构建 gdal 3.7.0 C++ 版本,以便我可以在 VS2019 的 C++ 项目中使用它。

错误信息:配置过程中出错,项目文件可能无效。

我可以知道如何成功构建它吗?

这是日志详细信息:

Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
The C compiler identification is MSVC 19.29.30151.0
The CXX compiler identification is MSVC 19.29.30151.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
CMake Deprecation Warning at cmake/modules/Ccache.cmake:10 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
CMakeLists.txt:58 (include)
Performing Test test_AVX
Performing Test test_AVX - Success
Performing Test test_AVX2
Performing Test test_AVX2 - Success
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
Found Python: C:/ProgramData/anaconda3/python.exe (found suitable version "3.11.3", minimum required is "3.6") found components: Interpreter Development NumPy Development.Module Development.Embed
Looking for vsnprintf
Looking for vsnprintf - not found
Looking for getcwd
Looking for getcwd - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for unistd.h
Looking for unistd.h - not found
Looking for sys/types.h
Looking for sys/types.h - found
Looking for locale.h
Looking for locale.h - found
Looking for xlocale.h
Looking for xlocale.h - not found
Looking for direct.h
Looking for direct.h - found
Looking for dlfcn.h
Looking for dlfcn.h - not found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of int
Check size of int - done
Check size of unsigned long
Check size of unsigned long - done
Check size of long int
Check size of long int - done
Check size of void*
Check size of void* - done
Check size of size_t
Check size of size_t - done
Looking for C++ include atlbase.h
Looking for C++ include atlbase.h - found
GDAL_VERSION = 3.7.0
GDAL_ABI_FULL_VERSION = 37
GDAL_SOVERSION =
Found ODBC: odbc32.lib
Could NOT find ODBCCPP (missing: ODBCCPP_LIBRARY ODBCCPP_INCLUDE_DIR)
Could NOT find MSSQL_NCLI (missing: MSSQL_NCLI_LIBRARY MSSQL_NCLI_INCLUDE_DIR MSSQL_NCLI_VERSION)
Found MSSQL_ODBC: C:/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/SDK/Lib/x64/msodbcsql17.lib (found version "17")
Could NOT find MySQL (missing: MYSQL_LIBRARY MYSQL_INCLUDE_DIR)
Found CURL: C:/ProgramData/anaconda3/Library/lib/libcurl.lib (found version "8.1.1")
Found Iconv: C:/ProgramData/anaconda3/Library/lib/iconv.lib
Performing Test _ICONV_SECOND_ARGUMENT_IS_NOT_CONST
Performing Test _ICONV_SECOND_ARGUMENT_IS_NOT_CONST - Success
Performing Test ICONV_HAS_EXTRA_CHARSETS
Performing Test ICONV_HAS_EXTRA_CHARSETS - Success
Found LibXml2: C:/ProgramData/anaconda3/Library/lib/libxml2.lib (found version "2.10.3")
Could NOT find EXPAT (missing: EXPAT_DIR)
Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
Failed to find XercesC (missing: XercesC_LIBRARY XercesC_INCLUDE_DIR XercesC_VERSION)
Found ZLIB: C:/ProgramData/anaconda3/Library/lib/z.lib (found version "1.2.13")
Found Deflate: C:/ProgramData/anaconda3/Library/lib/deflate.lib
Found OpenSSL: C:/ProgramData/anaconda3/Library/lib/libcrypto.lib (found version "1.1.1u") found components: SSL Crypto
Could NOT find CryptoPP (missing: CRYPTOPP_LIBRARY CRYPTOPP_TEST_KNOWNBUG CRYPTOPP_INCLUDE_DIR)
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PROJ (missing: PROJ_LIBRARY) (found suitable version
"6.3.2", minimum required is "6.0")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/packages/FindPROJ.cmake:57 (find_package_handle_standard_args)
cmake/helpers/CheckDependentLibraries.cmake:378 (find_package)
gdal.cmake:265 (include)
CMakeLists.txt:246 (include)
Configuring incomplete, errors occurred!
c++ cmake gdal proj
1个回答
0
投票

安装了 anaconda。

在 Anaconda promop 中使用命令“conda install Proj”安装了 PROJ。

在 Anaconda promop 中使用命令“conda install swig”安装了 swig。

然后,cmake 就可以正常工作了。

© www.soinside.com 2019 - 2024. All rights reserved.