Skip to content

Commit

Permalink
Merge pull request #6 from robryk/static-linking
Browse files Browse the repository at this point in the history
Fix static linking.
  • Loading branch information
robryk committed Dec 21, 2016
2 parents 0e49009 + f86b901 commit 431c6c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions guetzli.make
Expand Up @@ -24,7 +24,7 @@ ifeq ($(config),release)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
LIBS +=
LDDEPS +=
ALL_LDFLAGS += $(LDFLAGS) -s -lpng -lgflags_nothreads
ALL_LDFLAGS += $(LDFLAGS) -s -lpng -lgflags_nothreads -lz
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
Expand All @@ -51,7 +51,7 @@ ifeq ($(config),debug)
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
LIBS +=
LDDEPS +=
ALL_LDFLAGS += $(LDFLAGS) -lpng -lgflags_nothreads
ALL_LDFLAGS += $(LDFLAGS) -lpng -lgflags_nothreads -lz
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
define PREBUILDCMDS
endef
Expand Down
2 changes: 2 additions & 0 deletions guetzli.vcxproj
Expand Up @@ -70,6 +70,7 @@
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
Expand All @@ -85,6 +86,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
Expand Down
4 changes: 3 additions & 1 deletion premake5.lua
Expand Up @@ -13,7 +13,9 @@ workspace "guetzli"
language "C++"
includedirs { ".", "third_party/butteraugli" }
filter "action:gmake"
linkoptions { "-lpng", "-lgflags_nothreads" }
linkoptions { "-lpng", "-lgflags_nothreads", "-lz" }
filter "action:vs*"
links { "shlwapi" }
filter {}
-- This should work with gflags 2.x. The gflags namespace is absent in
-- gflags-2.0, which is the version in Ubuntu Trusty package repository.
Expand Down

0 comments on commit 431c6c1

Please sign in to comment.