2012-01-06 01:12:57 -03:00
|
|
|
# ASEPRITE
|
2018-03-26 14:08:08 -03:00
|
|
|
# Copyright (C) 2001-2018 David Capello
|
2010-08-10 21:49:32 -03:00
|
|
|
|
2010-09-30 17:04:32 -03:00
|
|
|
include_directories(.)
|
2010-08-10 21:49:32 -03:00
|
|
|
|
2010-08-25 16:18:46 -03:00
|
|
|
if(MSVC)
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif(MSVC)
|
|
|
|
|
2010-09-30 17:04:32 -03:00
|
|
|
if(NOT USE_SHARED_JPEGLIB)
|
|
|
|
add_subdirectory(jpeg)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT USE_SHARED_ZLIB)
|
2016-03-31 17:48:54 -03:00
|
|
|
set(SKIP_INSTALL_ALL on)
|
2016-04-01 09:50:09 -03:00
|
|
|
# Don't build zlib tests
|
|
|
|
set(ZLIB_TESTS OFF CACHE BOOL "Build zlib tests")
|
2010-09-30 17:04:32 -03:00
|
|
|
add_subdirectory(zlib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT USE_SHARED_LIBPNG)
|
2016-04-01 09:17:40 -03:00
|
|
|
set(SKIP_INSTALL_ALL ON)
|
|
|
|
# We only need the static version of 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")
|
2010-09-30 17:04:32 -03:00
|
|
|
add_subdirectory(libpng)
|
|
|
|
endif()
|
|
|
|
|
2012-03-15 00:17:49 -03:00
|
|
|
if(NOT USE_SHARED_GIFLIB)
|
2017-10-02 12:24:56 -03:00
|
|
|
set(GIFLIB_UTILS OFF CACHE BOOL "Build giflib utils")
|
2012-03-15 00:17:49 -03:00
|
|
|
add_subdirectory(giflib)
|
|
|
|
endif()
|
|
|
|
|
2018-03-26 14:08:08 -03:00
|
|
|
if(WITH_WEBP_SUPPORT)
|
2020-06-08 12:24:32 -03:00
|
|
|
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
|
2018-03-26 14:08:08 -03:00
|
|
|
add_subdirectory(libwebp)
|
|
|
|
endif()
|
|
|
|
|
2012-03-19 14:04:24 -03:00
|
|
|
if(NOT USE_SHARED_TINYXML)
|
|
|
|
add_subdirectory(tinyxml)
|
|
|
|
endif()
|
|
|
|
|
2018-08-24 18:24:05 -03:00
|
|
|
if(REQUIRE_CURL AND NOT USE_SHARED_CURL)
|
2015-03-10 13:50:12 -03:00
|
|
|
set(BUILD_RELEASE_DEBUG_DIRS ON BOOL)
|
2016-04-19 14:09:38 -03:00
|
|
|
set(CMAKE_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental")
|
2011-07-27 21:26:22 -03:00
|
|
|
add_subdirectory(curl)
|
|
|
|
endif()
|
2012-03-15 00:17:49 -03:00
|
|
|
|
2014-10-25 22:22:58 -03:00
|
|
|
if(NOT USE_SHARED_PIXMAN)
|
|
|
|
add_subdirectory(pixman-cmake)
|
|
|
|
endif()
|
2014-10-30 01:06:27 -03:00
|
|
|
|
2015-09-22 19:27:44 -03:00
|
|
|
if(NOT USE_SHARED_FREETYPE)
|
2016-03-31 17:48:54 -03:00
|
|
|
set(SKIP_INSTALL_ALL on)
|
2018-04-03 13:01:19 -03:00
|
|
|
set(WITH_BZip2 OFF CACHE BOOL "")
|
2016-03-31 17:48:54 -03:00
|
|
|
|
2015-09-22 19:27:44 -03:00
|
|
|
add_subdirectory(freetype2)
|
2016-04-04 12:24:40 -03:00
|
|
|
|
|
|
|
if(NOT USE_SHARED_LIBPNG)
|
2018-04-03 12:43:26 -03:00
|
|
|
add_dependencies(freetype ${PNG_LIBRARIES})
|
2016-04-04 12:24:40 -03:00
|
|
|
endif()
|
2015-09-22 19:27:44 -03:00
|
|
|
endif()
|
|
|
|
|
2017-06-08 01:49:51 +05:00
|
|
|
if(NOT USE_SHARED_HARFBUZZ)
|
2018-04-03 11:11:10 -03:00
|
|
|
if(NOT USE_SHARED_FREETYPE)
|
|
|
|
set(ENV{FREETYPE_DIR} ${FREETYPE_DIR})
|
|
|
|
endif()
|
2018-03-26 16:14:38 -03:00
|
|
|
set(HB_HAVE_FREETYPE ON CACHE BOOL "Enable freetype interop helpers")
|
|
|
|
set(HB_HAVE_GRAPHITE2 OFF CACHE BOOL "Enable Graphite2 complementary shaper")
|
|
|
|
set(HB_BUILTIN_UCDN ON CACHE BOOL "Use HarfBuzz provided UCDN")
|
|
|
|
set(HB_HAVE_GLIB OFF CACHE BOOL "Enable glib unicode functions")
|
|
|
|
set(HB_HAVE_ICU OFF CACHE BOOL "Enable icu unicode functions")
|
|
|
|
set(HB_HAVE_CORETEXT OFF CACHE BOOL "Enable CoreText shaper backend on macOS")
|
|
|
|
set(HB_HAVE_UNISCRIBE OFF CACHE BOOL "Enable Uniscribe shaper backend on Windows")
|
|
|
|
set(HB_HAVE_DIRECTWRITE OFF CACHE BOOL "Enable DirectWrite shaper backend on Windows")
|
|
|
|
add_subdirectory(harfbuzz)
|
2017-06-08 01:49:51 +05:00
|
|
|
endif()
|
|
|
|
|
2014-10-16 21:27:25 -03:00
|
|
|
add_subdirectory(simpleini)
|
2017-10-09 14:43:01 -03:00
|
|
|
add_subdirectory(fmt)
|
2016-12-06 16:03:51 -03:00
|
|
|
|
|
|
|
# Add cmark without tests
|
2017-01-28 16:18:41 +05:00
|
|
|
if(NOT USE_SHARED_CMARK)
|
|
|
|
set(CMARK_TESTS OFF CACHE BOOL "Build cmark tests and enable testing")
|
|
|
|
add_subdirectory(cmark)
|
|
|
|
set(cmark_headers
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/cmark/src/cmark.h
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_export.h
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_version.h)
|
|
|
|
foreach(fn ${cmark_headers})
|
|
|
|
get_filename_component(fn_name "${fn}" NAME)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${fn} ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
|
|
|
|
MAIN_DEPENDENCY ${fn})
|
|
|
|
list(APPEND copy_cmark_headers ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name})
|
|
|
|
endforeach()
|
|
|
|
add_custom_target(copy_cmark_headers DEPENDS ${copy_cmark_headers})
|
|
|
|
add_dependencies(libcmark_static copy_cmark_headers)
|
|
|
|
endif()
|
2017-06-10 15:02:39 -03:00
|
|
|
|
|
|
|
# JSON
|
2017-06-14 19:50:44 -03:00
|
|
|
add_subdirectory(json11)
|
2017-06-12 12:38:53 -03:00
|
|
|
|
|
|
|
# libarchive
|
2019-10-23 21:10:19 -03:00
|
|
|
set(ENABLE_WERROR OFF CACHE BOOL "Treat warnings as errors - default is ON for Debug, OFF otherwise.")
|
2017-06-12 13:20:32 -03:00
|
|
|
set(ENABLE_TEST OFF CACHE BOOL "Enable unit and regression tests")
|
|
|
|
set(ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)")
|
2017-06-24 13:44:25 -03:00
|
|
|
set(ENABLE_LZMA OFF CACHE BOOL "Enable the use of the system LZMA library if found")
|
2017-06-28 17:24:17 -03:00
|
|
|
set(ENABLE_CNG OFF CACHE BOOL "Enable the use of CNG(Crypto Next Generation)")
|
2018-04-03 13:01:19 -03:00
|
|
|
set(ENABLE_BZip2 OFF CACHE BOOL "Enable the use of the system BZip2 library if found")
|
2018-04-03 13:01:32 -03:00
|
|
|
set(ENABLE_LIBXML2 OFF CACHE BOOL "Enable the use of the system libxml2 library if found")
|
2017-06-12 12:38:53 -03:00
|
|
|
add_subdirectory(libarchive)
|
|
|
|
target_include_directories(archive_static INTERFACE
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>)
|
2017-07-18 17:03:12 -03:00
|
|
|
|
|
|
|
# benchmark
|
|
|
|
if(ENABLE_BENCHMARKS)
|
2018-04-03 12:40:38 -03:00
|
|
|
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "Enable testing of the benchmark library.")
|
2017-07-18 17:03:12 -03:00
|
|
|
add_subdirectory(benchmark)
|
|
|
|
endif()
|
2017-08-11 17:22:28 -03:00
|
|
|
|
2018-06-28 13:33:13 -03:00
|
|
|
# tinyexpr
|
|
|
|
add_library(tinyexpr tinyexpr/tinyexpr.c)
|
|
|
|
target_include_directories(tinyexpr PUBLIC tinyexpr)
|
2018-08-20 11:25:08 -03:00
|
|
|
|
|
|
|
# lua
|
2018-08-24 17:53:08 -03:00
|
|
|
if(ENABLE_SCRIPTING)
|
|
|
|
add_library(lua
|
|
|
|
lua/lapi.c
|
|
|
|
lua/lcode.c
|
|
|
|
lua/lctype.c
|
|
|
|
lua/ldebug.c
|
|
|
|
lua/ldo.c
|
|
|
|
lua/ldump.c
|
|
|
|
lua/lfunc.c
|
|
|
|
lua/lgc.c
|
|
|
|
lua/llex.c
|
|
|
|
lua/lmem.c
|
|
|
|
lua/lobject.c
|
|
|
|
lua/lopcodes.c
|
|
|
|
lua/lparser.c
|
|
|
|
lua/lstate.c
|
|
|
|
lua/lstring.c
|
|
|
|
lua/ltable.c
|
|
|
|
lua/ltm.c
|
|
|
|
lua/lundump.c
|
|
|
|
lua/lvm.c
|
|
|
|
lua/lzio.c
|
|
|
|
lua/ltests.c)
|
|
|
|
add_library(lauxlib lua/lauxlib.c)
|
|
|
|
add_library(lualib
|
|
|
|
lua/lbaselib.c
|
|
|
|
lua/lcorolib.c
|
|
|
|
lua/ldblib.c
|
|
|
|
lua/linit.c
|
|
|
|
lua/liolib.c
|
|
|
|
lua/lmathlib.c
|
|
|
|
lua/loadlib.c
|
|
|
|
lua/loslib.c
|
|
|
|
lua/lstrlib.c
|
|
|
|
lua/ltablib.c
|
|
|
|
lua/lutf8lib.c)
|
2018-11-05 17:26:18 -03:00
|
|
|
target_compile_definitions(lua PUBLIC LUA_FLOORN2I=1)
|
2018-08-24 17:53:08 -03:00
|
|
|
target_include_directories(lua PUBLIC lua)
|
|
|
|
target_include_directories(lauxlib PUBLIC lua)
|
|
|
|
target_include_directories(lualib PUBLIC lua)
|
|
|
|
target_link_libraries(lauxlib lua)
|
|
|
|
endif()
|