Skip to content

Commit

Permalink
Adding in optional linking and compiler defines for libPNG
Browse files Browse the repository at this point in the history
  • Loading branch information
permcody authored and Samuel Tew committed Jul 2, 2019
1 parent 8d623ff commit 624b521
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions framework/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ ifneq (x$(MOOSE_NO_PERF_GRAPH), x)
libmesh_CXXFLAGS += -DMOOSE_NO_PERF_GRAPH
endif

#
# libPNG Definition
#
png_LIB :=
ifneq (, $(shell which pkg-config 2>/dev/null))
RET_CODE := $(shell pkg-config --libs libpng 2>/dev/null 1>&2; echo $$?)

ifeq (0,$(RET_CODE))
png_LIB = $(shell pkg-config --libs libpng)
libmesh_CXXFLAGS += -DMOOSE_HAVE_LIBPNG
endif
endif

# Make.common used to provide an obj-suffix which was related to the
# machine in question (from config.guess, i.e. @host@ in
# contrib/utils/Make.common.in) and the $(METHOD).
Expand Down
2 changes: 1 addition & 1 deletion framework/moose.mk
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ $(hit_LIB): $(hit_objects)
$(moose_LIB): $(moose_objects) $(pcre_LIB) $(gtest_LIB) $(hit_LIB) $(pyhit_LIB)
@echo "Linking Library "$@"..."
@$(libmesh_LIBTOOL) --tag=CXX $(LIBTOOLFLAGS) --mode=link --quiet \
$(libmesh_CXX) $(CXXFLAGS) $(libmesh_CXXFLAGS) -o $@ $(moose_objects) $(pcre_LIB) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) -rpath $(FRAMEWORK_DIR)
$(libmesh_CXX) $(CXXFLAGS) $(libmesh_CXXFLAGS) -o $@ $(moose_objects) $(pcre_LIB) $(png_LIB) $(libmesh_LIBS) $(libmesh_LDFLAGS) $(EXTERNAL_FLAGS) -rpath $(FRAMEWORK_DIR)
@$(libmesh_LIBTOOL) --mode=install --quiet install -c $(moose_LIB) $(FRAMEWORK_DIR)

## Clang static analyzer
Expand Down

0 comments on commit 624b521

Please sign in to comment.