Skip to content

Commit

Permalink
GITC-1933 Temporary hacks to get RPMs to build in Docker - do not merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroberts committed Dec 17, 2020
1 parent fe6c73c commit 9f34bfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions mrf_apps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
include Makefile.lcl

TARGETS = can mrf_insert
GDAL_INCLUDE = -I $(PREFIX)/include -I $(GDAL_ROOT)
# LIBDIR = $(PREFIX)/lib64
BINDIR = $(PREFIX)/bin
GDAL_INCLUDE = -I $(PREFIX)/include -I $(GDAL_ROOT) -I /build/build/rpmbuild/BUILDROOT/gibs-gdal-2.4.4-2.el7.x86_64/usr/include/ -I /build/build/rpmbuild/BUILD/gibs-gdal-2.4.4/build/gdal/
LIBDIR = /build/build/rpmbuild/BUILDROOT/gibs-gdal-2.4.4-2.el7.x86_64/usr/lib64
BINDIR = /build/build/rpmbuild/BUILDROOT/gibs-gdal-2.4.4-2.el7.x86_64/usr/bin/
CP=cp

INCLUDES = $(GDAL_INCLUDE)

all: $(TARGETS)

mrf_insert: mrf_insert.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $< -L $(LIBDIR) -lgdal
$(CXX) -std=c++11 $(CXXFLAGS) $(INCLUDES) -o $@ $< -L $(LIBDIR) -lgdal

can: can.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $<
$(CXX) -std=c++11 $(CXXFLAGS) $(INCLUDES) -o $@ $<

install: $(TARGETS)
$(CP) $^ $(BINDIR)
Expand Down
6 changes: 3 additions & 3 deletions mrf_apps/mrf_insert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int main(int nArgc, char **papszArgv) {
if (atoi(GDALVersionInfo("VERSION_NUM")) < 1900)
{
fprintf(stderr, "At least, GDAL >= 1.9.0 is required for this version of %s, "
"which was compiled against GDAL %s\n", papszArgv[0], GDAL_RELEASE_NAME);
"which was compiled against GDAL 2.4.4\n", papszArgv[0]);
exit(1);
}

Expand Down Expand Up @@ -427,8 +427,8 @@ int main(int nArgc, char **papszArgv) {
{
if (EQUAL(papszArgv[iArg], "--utility_version"))
{
printf("%s was compiled against GDAL %s and is running against GDAL %s\n",
papszArgv[0], GDAL_RELEASE_NAME, GDALVersionInfo("RELEASE_NAME"));
printf("%s was compiled against GDAL 2.4.4 and is running against GDAL %s\n",
papszArgv[0], GDALVersionInfo("RELEASE_NAME"));
return 0;
}

Expand Down

0 comments on commit 9f34bfb

Please sign in to comment.