[aseprite] 79/250: Add required flags to link the application with freetype2 library

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit ce96a77aae31fd5b7657757907d9c79edf8ddeae
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Sep 22 19:27:44 2015 -0300

    Add required flags to link the application with freetype2 library
---
 CMakeLists.txt             | 13 ++++++++++++-
 src/app/CMakeLists.txt     |  3 ++-
 third_party/CMakeLists.txt |  4 ++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6173c2f..c76e7e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,7 @@ option(USE_SHARED_LIBLOADPNG "Use your installed copy of libloadpng" off)
 option(USE_SHARED_LIBWEBP "Use your installed copy of libwebp" off)
 option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
 option(USE_SHARED_PIXMAN  "Use your installed copy of pixman" off)
+option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
 option(USE_SHARED_ALLEGRO4 "Use shared Allegro 4 library (without resize support)" off)
 option(USE_ALLEG4_BACKEND "Use Allegro 4 backend" on)
 option(USE_SKIA_BACKEND   "Use Skia backend" off)
@@ -106,13 +107,13 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_PROFILE "${CMAKE_BINARY_DIR}/bin")
 
 set(CURL_DIR            ${CMAKE_SOURCE_DIR}/third_party/curl)
 set(GIFLIB_DIR          ${CMAKE_SOURCE_DIR}/third_party/giflib)
-set(LIBFREETYPE_DIR     ${CMAKE_SOURCE_DIR}/third_party/freetype)
 set(LIBJPEG_DIR         ${CMAKE_SOURCE_DIR}/third_party/jpeg)
 set(LIBPNG_DIR          ${CMAKE_SOURCE_DIR}/third_party/libpng)
 set(LOADPNG_DIR         ${CMAKE_SOURCE_DIR}/third_party/loadpng)
 set(LIBWEBP_DIR         ${CMAKE_SOURCE_DIR}/third_party/libwebp)
 set(MONGOOSE_DIR        ${CMAKE_SOURCE_DIR}/third_party/mongoose)
 set(PIXMAN_DIR          ${CMAKE_SOURCE_DIR}/third_party/pixman)
+set(FREETYPE_DIR        ${CMAKE_SOURCE_DIR}/third_party/freetype2)
 set(SIMPLEINI_DIR       ${CMAKE_SOURCE_DIR}/third_party/simpleini)
 set(TINYXML_DIR         ${CMAKE_SOURCE_DIR}/third_party/tinyxml)
 set(ZLIB_DIR            ${CMAKE_SOURCE_DIR}/third_party/zlib)
@@ -212,6 +213,16 @@ else()
 endif()
 include_directories(${PIXMAN_INCLUDE_DIR})
 
+# freetype
+if(USE_SHARED_FREETYPE)
+  find_library(FREETYPE_LIBRARY NAMES freetype)
+  find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h)
+else()
+  set(FREETYPE_LIBRARY freetype)
+  set(FREETYPE_INCLUDE_DIR ${FREETYPE_DIR}/include)
+endif()
+include_directories(${FREETYPE_INCLUDE_DIR})
+
 if(USE_SHARED_GIFLIB)
   find_package(GIF REQUIRED)
   if(NOT GIF_FOUND)
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index ac37c86..7c79e30 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -423,7 +423,8 @@ target_link_libraries(app-lib
   ${GIF_LIBRARIES}
   ${PNG_LIBRARIES}
   ${WEBP_LIBRARIES}
-  ${ZLIB_LIBRARIES})
+  ${ZLIB_LIBRARIES}
+  ${FREETYPE_LIBRARY})
 
 if(ENABLE_UPDATER)
   target_link_libraries(app-lib updater-lib)
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt
index 07c2777..a191e1e 100644
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -60,4 +60,8 @@ if(NOT USE_SHARED_PIXMAN)
   add_subdirectory(pixman-cmake)
 endif()
 
+if(NOT USE_SHARED_FREETYPE)
+  add_subdirectory(freetype2)
+endif()
+
 add_subdirectory(simpleini)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list