mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Add support to link ASE with the shared versions of libjpeg, libpng, and zlib.
This commit is contained in:
parent
9ed888b82b
commit
3163a5ac98
@ -11,8 +11,11 @@ project(aseprite)
|
||||
######################################################################
|
||||
# Options (these can be specified in cmake command line or modifying CMakeCache.txt)
|
||||
|
||||
option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)
|
||||
option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)
|
||||
option(USE_STATIC_ALLEGRO "Use static version of Allegro library" 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)
|
||||
|
||||
######################################################################
|
||||
# Directories of third-party libraries
|
||||
|
@ -38,7 +38,38 @@ if(MSVC)
|
||||
endif(MSVC)
|
||||
|
||||
# Third-party libraries
|
||||
set(libs3rdparty freetype jpeg libart_lgpl libpng loadpng tinyxml zlib)
|
||||
set(libs3rdparty freetype libart_lgpl loadpng tinyxml)
|
||||
|
||||
if(USE_SHARED_JPEGLIB)
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
set(libs3rdparty ${libs3rdparty} ${JPEG_LIBRARIES})
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
endif(JPEG_FOUND)
|
||||
else()
|
||||
set(libs3rdparty ${libs3rdparty} jpeg)
|
||||
endif()
|
||||
|
||||
if(USE_SHARED_ZLIB)
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(libs3rdparty ${libs3rdparty} ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
endif(ZLIB_FOUND)
|
||||
else()
|
||||
set(libs3rdparty ${libs3rdparty} zlib)
|
||||
endif()
|
||||
|
||||
if(USE_SHARED_LIBPNG)
|
||||
find_package(PNG)
|
||||
if(PNG_FOUND)
|
||||
set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
|
||||
add_definitions(${PNG_DEFINITIONS})
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
endif(PNG_FOUND)
|
||||
else()
|
||||
set(libs3rdparty ${libs3rdparty} libpng)
|
||||
endif()
|
||||
|
||||
# All libraries for .exe files
|
||||
set(all_libs aseprite-library gui-lib gfx-lib base-lib ${alleg_lib} ${libs3rdparty} ${sys_libs})
|
||||
|
21
third_party/CMakeLists.txt
vendored
21
third_party/CMakeLists.txt
vendored
@ -1,17 +1,28 @@
|
||||
# ASE - Allegro Sprite Editor
|
||||
# Copyright (C) 2001-2010 David Capello
|
||||
|
||||
include_directories(. libpng zlib)
|
||||
include_directories(.)
|
||||
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif(MSVC)
|
||||
|
||||
if(NOT USE_SHARED_JPEGLIB)
|
||||
add_subdirectory(jpeg)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_ZLIB)
|
||||
include_directories(zlib)
|
||||
add_subdirectory(zlib)
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_LIBPNG)
|
||||
include_directories(libpng)
|
||||
add_subdirectory(libpng)
|
||||
endif()
|
||||
|
||||
add_subdirectory(gtest)
|
||||
add_subdirectory(freetype)
|
||||
add_subdirectory(jpeg)
|
||||
add_subdirectory(libart_lgpl)
|
||||
add_subdirectory(libpng)
|
||||
add_subdirectory(loadpng)
|
||||
add_subdirectory(tinyxml)
|
||||
add_subdirectory(zlib)
|
||||
add_subdirectory(gtest)
|
||||
|
Loading…
Reference in New Issue
Block a user