Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix GUI-less build. Also potentially OS X. We now require libpng due …
…to our screenshot code relying on it now. WXWidgets links in libpng by itself so it isn't noticed in a wxwidgets build. OS X seems to not have libpng linked in from wxWidgets so just link in libpng at all times.
  • Loading branch information
Sonicadvance1 committed Nov 15, 2013
1 parent ba71cdc commit 117bf43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Expand Up @@ -524,11 +524,16 @@ else()
set(LZO lzo2)
endif()

if(ANDROID)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
check_lib(PNG png png.h QUIET)
endif()
if (PNG_FOUND)
message("Using shared libpng")
else()
message("Using static libpng from Externals")
add_subdirectory(Externals/libpng)
include_directories(Externals/libpng)
set(PNG libpng)
set(PNG png)
endif()

if(OPENAL_FOUND)
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/VideoCommon/CMakeLists.txt
Expand Up @@ -39,8 +39,7 @@ set(SRCS Src/BPFunctions.cpp
Src/XFMemory.cpp
Src/XFStructs.cpp
Src/memcpy_amd.cpp)

set(LIBS core)
set(LIBS core png)

if(NOT _M_GENERIC)
set(SRCS ${SRCS} Src/x64TextureDecoder.cpp
Expand Down

0 comments on commit 117bf43

Please sign in to comment.