如何在Windows上使用FindGDAL?

时间:2016-08-23 22:58:46

标签: windows cmake gdal

我们的程序需要gdal,所以我们得到了它,并使用他们的指示编译它。因此,C:\ warmerda \ bld \ include有.h文件,C:\ warmerda \ bld \ lib有gdal.lib和gdal_i.lib,等等。

我在我的CMakeLists.txt中有这个:

set(GDAL_DIR C:/warmerda/bld)
find_package(GDAL REQUIRED)

然而,当我运行cmake时,我得到的只是:

$ cmake . -G"Visual Studio 14 2015 Win64"
-- Boost version: 1.59.0
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindGDAL.cmake:116 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  main/CMakeLists.txt:31 (find_package)

0 个答案:

没有答案