[Geotiff] CMakeLists.txt

David Burken dburken at comcast.net
Sun Jul 17 12:14:48 EST 2011


Hi,

Minor tweak to CMakeLists.txt:

Since geo_tiffp.h does:

#include "xtiffio.h"

and xtiffio.h is in libxtiff subdirectory and  xtiff.c does:

#include "cpl_serv.h" and it's in the root directory I added:

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff)

To get a good build.

Also to fix gdal build error using external geotiff from a libgeotiff 
make install I added:

     libxtiff/xtiffio.h

to the GEOTIFF_LIB_HEADERS so that xtiffio.h gets installed in my 
CMAKE_INSTALL_PREFIX/include

Patch:
$ svn diff CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt    (revision 2069)
+++ CMakeLists.txt    (working copy)
@@ -127,6 +127,9 @@
  ###############################################################################
  # Search for dependencies

+INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/libxtiff)
+
  # TIFF support - required, default=ON
  SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built")

@@ -264,7 +267,8 @@
      epsg_pcs.inc
      epsg_proj.inc
      epsg_vertcs.inc
-    geokeys.inc)
+    geokeys.inc
+    libxtiff/xtiffio.h)

  #    ${PROJECT_BINARY_DIR}/geotiff_version.h

Take care,
Dave



More information about the Geotiff mailing list