+++ Martin Luethi [2009-05-05 12:27 +0200]:
Hi
There are some weird settings in the Loch Makefile for the VTK variables. It seems that VTKPATH is used to mean VTKINCLUDEPATH, but also for VTKLIBPATH, which causes problems. Here is a better version (only for target Debian)
Best, Martin
# PLATFORM DEBIAN CXX = c++ CC = gcc POBJECTS = lxR2P.o VTKPATH = /usr/local VTKINCLUDEPATH = $(VTKPATH)/include/vtk-5.2 VTKLIBPATH = $(VTKPATH)/lib/vtk-5.2 VTKLIBS = -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lfreetype CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated $(shell freetype-config --cflags) -I$(VTKINCLUDEPATH) CCPFLAGS = -DLXLINUX $(shell wx-config --cflags) LXLIBDIR = linux PLIBS = $(shell wx-config --libs --gl-libs) -L$(VTKLIBPATH) $(VTKLIBS) -lGLU -lpthread -lz LXPLATFORM = LINUX
Here is my version for the current Debian packaging. The VTKVER magic is to allow for builds on stable/unstable (different versions of VTK, and it doesn't have pck-config support to solve this in a neater way). I don't know if there is some cmake magic that can be used to fish out current correct paths for installed VTK version. I agree your variable names are nicer, but I was trying to keep changes minimal. As soon as I get my SVN therion repo working again I'll check in the current stuff so anyone is interested can compare notes. CXX = c++ CC = gcc POBJECTS = lxR2P.o VTKVER = $(shell ls -d /usr/include/vtk-5.? | grep -o vtk-5.*$) VTKPATH = /usr/include/$(VTKVER) VTKLIBPATH = /usr/lib/$(VTKVER) VTKLIBS = -lvtkHybrid -lvtkGraphics -lvtkFiltering -lvtkCommon -lfreetype CXXPFLAGS = -DLXLINUX $(shell wx-config --cxxflags) -Wno-deprecated -fno-strict-aliasing $(shell freetype-config --cflags) -I$(VTKPATH) CCPFLAGS = -DLXLINUX $(shell wx-config --cflags) LXLIBDIR = linux PLIBS = $(shell wx-config --libs --gl-libs) $(VTKLIBS) -lpthread LXPLATFORM = LINUX ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CCBFLAGS = -ggdb CXXBFLAGS = -ggdb -DLXDEBUG endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s LDFLAGS += -s endif ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CCBFLAGS = -O2 CXXBFLAGS = -O2 endif # compiler settings CXXFLAGS = -Wall -D_GNU_SOURCE -DLOCH $(CXXPFLAGS) $(CXXBFLAGS) CCFLAGS = -Wall -D_GNU_SOURCE -DLOCH $(CCPFLAGS) $(CCBFLAGS) OBJECTS = $(POBJECTS) $(CMNOBJECTS) Wookey -- Principal hats: iEndian - Balloonboard - Toby Churchill - Emdebian http://wookware.org/