[Liblas-commits] r1292 - in trunk: . apps src

liblas-commits at liblas.org liblas-commits at liblas.org
Thu May 28 15:12:37 EDT 2009


Author: hobu
Date: Thu May 28 15:12:37 2009
New Revision: 1292
URL: http://liblas.org/changeset/1292

Log:
support building lasindex on windows

Modified:
   trunk/apps/lasindex.cpp
   trunk/apps/makefile.vc
   trunk/nmake.opt
   trunk/src/makefile.vc

Modified: trunk/apps/lasindex.cpp
==============================================================================
--- trunk/apps/lasindex.cpp	(original)
+++ trunk/apps/lasindex.cpp	Thu May 28 15:12:37 2009
@@ -8,10 +8,7 @@
 #include <liblas/lasheader.hpp>
 #include <liblas/index/index.hpp>
 
-#ifdef HAVE_SPATIALINDEX
-#include <spatialindex/SpatialIndex.h>
 
-#endif
 #include <iostream>
 #include <fstream>
 #include <vector>

Modified: trunk/apps/makefile.vc
==============================================================================
--- trunk/apps/makefile.vc	(original)
+++ trunk/apps/makefile.vc	Thu May 28 15:12:37 2009
@@ -7,11 +7,11 @@
 all: default
 
 las2las.exe:
-	$(CC) $(CFLAGS) las2las.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GEOTIFF_LIB)
+	$(CC) $(CFLAGS) las2las.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 lasinfo.exe:
-	$(CC) $(CFLAGS) lasinfo.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GEOTIFF_LIB)
+	$(CC) $(CFLAGS) lasinfo.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 #lasdiff.exe:
@@ -19,27 +19,36 @@
 #	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 las2txt.exe:
-	$(CC) $(CFLAGS) las2txt.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GEOTIFF_LIB)
+	$(CC) $(CFLAGS) las2txt.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 lasmerge.exe:
-	$(CC) $(CFLAGS) lasmerge.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GEOTIFF_LIB)
+	$(CC) $(CFLAGS) lasmerge.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 txt2las.exe:
-	$(CC) $(CFLAGS) txt2las.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GEOTIFF_LIB)
+	$(CC) $(CFLAGS) txt2las.c lascommon.c $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 
 !IF "$(GDAL_HOME)" != "" && EXIST("$(GDAL_HOME)")
 las2ogr.exe:
-	$(CC) $(CFLAGS) las2ogr.cpp $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GDAL_LIB) ..\src\$(LAS_LIB)
+	$(CC) $(CFLAGS) las2ogr.cpp $(LAS_ROOT)/src/$(LAS_LIB_DLL) $(GDAL_LIB) ..\src\$(LAS_LIB) $(EX_LIBS)
 	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
 !ELSE
 las2ogr.exe: 
     
 !ENDIF
 
-default: las2las.exe lasinfo.exe las2txt.exe lasmerge.exe txt2las.exe las2ogr.exe
+!IF "$(SPATIALINDEX_HOME)" != "" && EXIST("$(SPATIALINDEX_HOME)")
+lasindex.exe:
+	$(CC) $(CFLAGS) lasindex.cpp $(LAS_ROOT)/src/$(LAS_LIB_DLL) ..\src\$(LAS_LIB) $(EX_LIBS)
+	if exist $@.manifest mt -manifest $@.manifest -outputresource:$@;1
+!ELSE
+lasindex.exe: 
+    
+!ENDIF
+
+default: las2las.exe lasinfo.exe las2txt.exe lasmerge.exe txt2las.exe las2ogr.exe lasindex.exe
 
 
 clean:

Modified: trunk/nmake.opt
==============================================================================
--- trunk/nmake.opt	(original)
+++ trunk/nmake.opt	Thu May 28 15:12:37 2009
@@ -95,6 +95,27 @@
 !ENDIF
 
 ###############################################################################
+# Spatial Indexing Support
+
+SPATIALINDEX_HOME=C:\cvs\buildkit\spatialindex
+
+
+!IF "$(SPATIALINDEX_HOME)" != "" && EXIST("$(SPATIALINDEX_HOME)")
+!MESSAGE *** Spatial indexing support enabled
+!MESSAGE *** Setting SPATIALINDEX_HOME $(SPATIALINDEX_HOME)
+
+SPATIALINDEX_LIB = $(SPATIALINDEX_HOME)\spatialindex.lib
+SPATIALINDEX_INCLUDE = -I$(SPATIALINDEX_HOME)\include
+INCLUDES = $(INCLUDES) $(SPATIALINDEX_INCLUDE)
+
+!ELSE
+SPATIALINDEX_HOME=""
+!MESSAGE *** Support of GDAL/OGR has been disabled (GDAL_HOME not set)
+!ENDIF
+
+EX_LIBS = $(GDAL_LIB) $(GEOTIFF_LIB) $(SPATIALINDEX_LIB)
+
+###############################################################################
 # Distribution directories
 
 LAS_HOME=C:\cvs\liblas\trunk
@@ -180,6 +201,12 @@
 !ENDIF
 !ENDIF
 
+!IF "$(SPATIALINDEX_HOME)" != "" && EXIST("$(SPATIALINDEX_HOME)")
+CFLAGS = $(CFLAGS) /DHAVE_SPATIALINDEX=1
+!ENDIF
+
+
+
 ###############################################################################
 # Building toolset programs
 

Modified: trunk/src/makefile.vc
==============================================================================
--- trunk/src/makefile.vc	(original)
+++ trunk/src/makefile.vc	Thu May 28 15:12:37 2009
@@ -26,6 +26,13 @@
     detail\writer12.obj \
     detail\file.obj
 
+!IF "$(SPATIALINDEX_HOME)" != "" && EXIST("$(SPATIALINDEX_HOME)")
+LAS_OBJS = $(LAS_OBJS) index\index.obj \
+            index\datastream.obj \
+            index\visitor.obj \
+            index\storage.obj
+!ENDIF
+
 RES = Version.res
 
 default: $(LAS_DLL) $(RES)
@@ -34,7 +41,7 @@
 
 $(LAS_LIB):	$(LAS_OBJS)
     if exist $(LAS_LIB) del $(LAS_LIB)
-    $(LINK) /lib /nologo /out:$(LAS_LIB) $(LAS_OBJS) $(GEOTIFF_LIB) $(GDAL_LIB)
+    $(LINK) /lib /nologo /out:$(LAS_LIB) $(LAS_OBJS) $(EX_LIBS)
 	
 $(LAS_DLL):	$(LAS_LIB) $(RES)
     $(LINK) /dll \


More information about the Liblas-commits mailing list