mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-14 12:40:55 +00:00
Fix zlib, png, jpeg, and freetype flags/linking
This commit is contained in:
parent
f554801dd0
commit
5b04293dc3
@ -198,10 +198,13 @@ endif()
|
||||
if(USE_SHARED_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else()
|
||||
set(ZLIB_LIBRARIES zlibstatic)
|
||||
set(ZLIB_FOUND)
|
||||
set(ZLIB_LIBRARY zlibstatic)
|
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||
set(ZLIB_INCLUDE_DIRS
|
||||
${ZLIB_DIR}
|
||||
${CMAKE_BINARY_DIR}/third_party/zlib) # Zlib generated zconf.h file
|
||||
set(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS} CACHE PATH "")
|
||||
endif()
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
@ -210,10 +213,14 @@ if(USE_SHARED_LIBPNG)
|
||||
find_package(PNG REQUIRED)
|
||||
add_definitions(${PNG_DEFINITIONS})
|
||||
else()
|
||||
set(PNG_LIBRARIES png_static)
|
||||
set(PNG_FOUND ON)
|
||||
set(PNG_LIBRARY png_static)
|
||||
set(PNG_LIBRARIES ${PNG_LIBRARY})
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBPNG_DIR})
|
||||
set(PNG_INCLUDE_DIRS
|
||||
${LIBPNG_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/third_party/libpng) # Libpng generated pnglibconf.h file
|
||||
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS})
|
||||
endif()
|
||||
include_directories(${PNG_INCLUDE_DIRS})
|
||||
add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
|
||||
@ -251,7 +258,9 @@ include_directories(${PIXMAN_INCLUDE_DIR})
|
||||
if(USE_SHARED_FREETYPE)
|
||||
find_package(Freetype REQUIRED)
|
||||
else()
|
||||
set(FREETYPE_LIBRARIES freetype)
|
||||
set(FREETYPE_FOUND ON)
|
||||
set(FREETYPE_LIBRARY freetype)
|
||||
set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
||||
set(FREETYPE_INCLUDE_DIRS ${FREETYPE_DIR}/include)
|
||||
endif()
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
@ -269,17 +278,20 @@ if(USE_SHARED_GIFLIB)
|
||||
find_package(GIF REQUIRED)
|
||||
else()
|
||||
set(GIF_LIBRARY giflib)
|
||||
set(GIF_LIBRARIES giflib)
|
||||
set(GIF_LIBRARIES ${GIF_LIBRARY})
|
||||
set(GIF_INCLUDE_DIR ${GIFLIB_DIR}/lib)
|
||||
set(GIF_INCLUDE_DIRS ${GIFLIB_DIR}/lib)
|
||||
set(GIF_INCLUDE_DIRS ${GIF_INCLUDE_DIR})
|
||||
endif()
|
||||
include_directories(${GIF_INCLUDE_DIRS})
|
||||
|
||||
if(USE_SHARED_JPEGLIB)
|
||||
find_package(JPEG REQUIRED)
|
||||
else()
|
||||
set(JPEG_LIBRARIES jpeg)
|
||||
set(JPEG_INCLUDE_DIRS ${LIBJPEG_DIR})
|
||||
set(JPEG_FOUND ON)
|
||||
set(JPEG_INCLUDE_DIR ${LIBJPEG_DIR})
|
||||
set(JPEG_LIBRARY jpeg CACHE FILEPATH "")
|
||||
set(JPEG_LIBRARIES ${JPEG_LIBRARY})
|
||||
set(JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR})
|
||||
endif()
|
||||
include_directories(${JPEG_INCLUDE_DIRS})
|
||||
|
||||
|
14
third_party/CMakeLists.txt
vendored
14
third_party/CMakeLists.txt
vendored
@ -13,7 +13,6 @@ endif()
|
||||
|
||||
if(NOT USE_SHARED_ZLIB)
|
||||
set(SKIP_INSTALL_ALL on)
|
||||
set(ZLIB_LIBRARY zlibstatic)
|
||||
# Don't build zlib tests
|
||||
set(ZLIB_TESTS OFF CACHE BOOL "Build zlib tests")
|
||||
add_subdirectory(zlib)
|
||||
@ -25,7 +24,6 @@ if(NOT USE_SHARED_LIBPNG)
|
||||
set(PNG_SHARED OFF CACHE BOOL "Build shared lib")
|
||||
set(PNG_STATIC ON CACHE BOOL "Build static lib")
|
||||
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
|
||||
set(ZLIB_INCLUDE_DIR "${ZLIB_INCLUDE_DIRS}")
|
||||
add_subdirectory(libpng)
|
||||
endif()
|
||||
|
||||
@ -35,15 +33,6 @@ if(NOT USE_SHARED_GIFLIB)
|
||||
endif()
|
||||
|
||||
if(WITH_WEBP_SUPPORT)
|
||||
if(NOT USE_SHARED_LIBPNG)
|
||||
set(PNG_PNG_INCLUDE_DIR ${LIBPNG_DIR} CACHE STRING "")
|
||||
set(PNG_LIBRARY $<TARGET_FILE:png_static> CACHE FILEPATH "")
|
||||
endif()
|
||||
if(NOT USE_SHARED_JPEGLIB)
|
||||
set(JPEG_INCLUDE_DIR ${LIBJPEG_DIR} CACHE STRING "")
|
||||
set(JPEG_LIBRARY $<TARGET_FILE:jpeg> CACHE FILEPATH "")
|
||||
endif()
|
||||
|
||||
# Enable img2webp so "webpmux" library is built
|
||||
set(WEBP_BUILD_IMG2WEBP ON CACHE BOOL "Build the img2webp animation tool.")
|
||||
add_subdirectory(libwebp)
|
||||
@ -88,14 +77,13 @@ if(NOT USE_SHARED_FREETYPE)
|
||||
add_subdirectory(freetype2)
|
||||
|
||||
if(NOT USE_SHARED_LIBPNG)
|
||||
add_dependencies(freetype png_static)
|
||||
add_dependencies(freetype ${PNG_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_HARFBUZZ)
|
||||
if(NOT USE_SHARED_FREETYPE)
|
||||
set(ENV{FREETYPE_DIR} ${FREETYPE_DIR})
|
||||
set(FREETYPE_LIBRARY $<TARGET_FILE:freetype> CACHE FILEPATH "")
|
||||
endif()
|
||||
set(HB_HAVE_FREETYPE ON CACHE BOOL "Enable freetype interop helpers")
|
||||
set(HB_HAVE_GRAPHITE2 OFF CACHE BOOL "Enable Graphite2 complementary shaper")
|
||||
|
2
third_party/harfbuzz
vendored
2
third_party/harfbuzz
vendored
@ -1 +1 @@
|
||||
Subproject commit 87673c251a88c1ef38757c7d295a587c70e46124
|
||||
Subproject commit ed5185eed55086b185f9d5f054af4e03496dd99c
|
Loading…
Reference in New Issue
Block a user