Created
January 10, 2014 20:34
-
-
Save sgolemon/8362044 to your computer and use it in GitHub Desktop.
Possible fix for freetype linking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMake/FindFreetype.cmake b/CMake/FindFreetype.cmake | |
index 4603d01..3a3d4bf 100644 | |
--- a/CMake/FindFreetype.cmake | |
+++ b/CMake/FindFreetype.cmake | |
@@ -1,15 +1,10 @@ | |
-if (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS) | |
- set (Freetype_FIND_QUIETLY TRUE) | |
-endif (FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS) | |
+find_package(PkgConfig) | |
+pkg_check_modules(PC_FREETYPE QUIET freetype2) | |
-find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/freetype.h) | |
-if (NOT FREETYPE_INCLUDE_DIRS) | |
- find_path(FREETYPE_INCLUDE_DIRS NAMES freetype2/freetype/freetype.h) | |
- if (FREETYPE_INCLUDE_DIRS) | |
- set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIRS}/freetype2" CACHE PATH "Freetype include directory" FORCE) | |
- endif() | |
-endif() | |
+find_path(FREETYPE_INCLUDE_DIRS NAMES freetype/config/ftheader.h | |
+ HINTS ${PC_FREETYPE_INCLUDEDIR} ${PC_FREETYPE_INCLUDE_DIRS} | |
+ PATH_SUFFIXES freetype2) | |
find_library(FREETYPE_LIBRARIES NAMES freetype) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment