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.

This commit is contained in:
Ryan Houdek 2013-11-15 01:09:38 +00:00
parent ba71cdcc51
commit 117bf435b0
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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