@@ -43,6 +43,8 @@ CMAKE_OPTS := \
43
43
-D QGIS_CGIBIN_SUBDIR=/usr/lib/cgi-bin \
44
44
-D WITH_APIDOC=TRUE
45
45
46
+ MAKEFLAGS += VERBOSE=YES
47
+
46
48
ifneq (,$(findstring $(DISTRIBUTION ) ,"squeeze wheezy lucid maverick natty oneiric precise") )
47
49
CMAKE_OPTS += -D WITH_PYSPATIALITE=TRUE
48
50
endif
57
59
CMAKE_OPTS += -D WITH_GLOBE=TRUE
58
60
endif
59
61
62
+ ifneq (,$(findstring $(DISTRIBUTION ) ,"wheezy sid") )
63
+ CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
64
+ CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS )
65
+ CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS )
66
+ LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
67
+ endif
68
+
60
69
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS ) ) )
61
70
CFLAGS += -O0
71
+ CXXFLAGS += -O0
62
72
else
63
73
CFLAGS += -O2
74
+ CXXFLAGS += -O2
64
75
endif
76
+
65
77
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS ) ) )
66
78
INSTALL_PROGRAM += -s
67
79
endif
68
80
69
81
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS ) ) )
70
82
CMAKE_OPTS += -D CMAKE_BUILD_TYPE=Debug -D ENABLE_TESTS=TRUE
71
- MAKEFLAGS += VERBOSE=YES
72
83
endif
73
84
74
85
ifneq (,$(findstring profile,$(DEB_BUILD_OPTIONS ) ) )
@@ -99,7 +110,7 @@ debian/build/CMakeCache.txt: $(TEMPLATES) CMakeLists.txt
99
110
# Add here commands to configure the package.
100
111
[ -d debian/build ] || mkdir debian/build
101
112
[ ! -e CMakeCache.txt ] || rm CMakeCache.txt
102
- cd debian/build; cmake $(CMAKE_OPTS ) ../..
113
+ cd debian/build; CFLAGS= " $( CFLAGS ) " CXXFLAGS= " $( CXXFLAGS ) " LDFLAGS= " $( LDFLAGS ) " cmake $(CMAKE_OPTS ) ../..
103
114
104
115
build : build-stamp
105
116
0 commit comments