improvements for static build and a bit of cleaning

This commit is contained in:
filux
2015-06-14 19:23:53 +02:00
parent 72539021f9
commit 74cbbba6ba
13 changed files with 65 additions and 53 deletions

View File

@@ -5,15 +5,22 @@
# FONTCONFIG_LIBRARIES - List of libraries when using FONTCONFIG.
# FONTCONFIG_FOUND - True if FONTCONFIG found.
IF(WANT_STATIC_LIBS)
OPTION(FONTCONFIG_STATIC "Set to ON to link your project with static library (instead of DLL)." ON)
ENDIF()
# Look for the header file.
FIND_PATH( FONTCONFIG_INCLUDE_DIR NAMES fontconfig/fontconfig.h
DOC "Path in which the file fontconfig/fontconfig.h is located." )
MARK_AS_ADVANCED(FONTCONFIG_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES fontconfig
DOC "Path to fontconfig library." )
IF(FONTCONFIG_STATIC)
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES libfontconfig.a fontconfig
DOC "Path to fontconfig library." )
ELSE()
FIND_LIBRARY( FONTCONFIG_LIBRARY NAMES fontconfig
DOC "Path to fontconfig library." )
ENDIF()
MARK_AS_ADVANCED(FONTCONFIG_LIBRARY)
# Copy the results to the output variables.