Do not use the embedded libloadpng.

Add the option to use a shared libloadpng library.
Patch by Tobias Hansen <tobias.han@gmx.de>
This commit is contained in:
David Capello 2012-07-08 21:21:01 -03:00
parent c3030b9daa
commit a35aa7559a
3 changed files with 15 additions and 3 deletions

View File

@ -35,6 +35,7 @@ option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off)
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
option(USE_SHARED_LIBLOADPNG "Use your installed copy of libloadpng" off)
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
option(USE_SHARED_GTEST "Use your installed copy of gtest" off)
option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)

View File

@ -15,8 +15,6 @@ set(aseprite_libraries aseprite-library undo-lib filters-lib ui-lib gfx-lib base
include_directories(. .. ../third_party)
# Third-party libraries
set(libs3rdparty loadpng)
include_directories(${LOADPNG_DIR})
if(USE_SHARED_JPEGLIB)
find_package(JPEG)
@ -73,6 +71,17 @@ else()
include_directories(${TINYXML_DIR})
endif()
if(USE_SHARED_LIBLOADPNG)
find_library(LIBLOADPNG_LIBRARY NAMES loadpng)
find_path(LIBLOADPNG_INCLUDE_DIR NAMES loadpng.h)
set(libs3rdparty ${libs3rdparty} ${LIBLOADPNG_LIBRARY})
include_directories(${LIBLOADPNG_INCLUDE_DIR})
else()
set(libs3rdparty ${libs3rdparty} loadpng)
include_directories(${LOADPNG_DIR})
endif()
if (CMAKE_USE_PTHREADS_INIT)
set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT})
endif()

View File

@ -36,4 +36,6 @@ if(ENABLE_UPDATER AND NOT USE_SHARED_CURL)
add_subdirectory(curl)
endif()
add_subdirectory(loadpng)
if(NOT USE_SHARED_LIBLOADPNG)
add_subdirectory(loadpng)
endif()