Fix FindFreetype naming and find logic

Freetype is quite complicated, copied most of the logic from the
original FindFreetype module.
This commit is contained in:
BtbN
2014-08-21 02:20:05 +02:00
parent 997b4f9161
commit 5ec0d2ded4
2 changed files with 57 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
project(text-freetype2)
find_package(Freetype QUIET)
if(NOT LIBFREETYPE_FOUND)
if(NOT FREETYPE_FOUND)
message(STATUS "Freetype library not found, Freetype text plugin disabled")
return()
endif()
@@ -47,8 +47,7 @@ else()
include_directories(${ICONV_INCLUDE_DIR})
endif()
include_directories(${LIBFREETYPE_INCLUDE_DIRS})
add_definitions(${LIBFREETYPE_DEFINITIONS})
include_directories(${FREETYPE_INCLUDE_DIRS})
set(text-freetype2_SOURCES
find-font.h
@@ -65,7 +64,7 @@ add_library(text-freetype2 MODULE
target_link_libraries(text-freetype2
libobs
${text-freetype2_PLATFORM_DEPS}
${LIBFREETYPE_LIBRARIES})
${FREETYPE_LIBRARIES})
if(UNIX AND ICONV_FOUND)
target_link_libraries(text-freetype2 ${ICONV_LIBRARIES})