Fix freetype cmake module
On fedora, the freetype cmake module would not find the correct location. This is because it wasn't using the pkg-cofig include directory, which is different from the main ft2build.h header directory (which is /usr/include). This modification may be a good thing to do on all the cmake packages, actually. Currently, they all just search for the location of a specific header, and ignore the pkg-config includes if they find it in specific hint locations.
This commit is contained in:
parent
5291760cf8
commit
b54ab482b5
@ -25,16 +25,20 @@ else()
|
||||
|
||||
set(FREETYPE_PATH_ARCH FreetypePath${_lib_suffix})
|
||||
|
||||
find_path(FREETYPE_INCLUDE_DIR
|
||||
NAMES ft2build.h
|
||||
HINTS
|
||||
${_FREETYPE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FreetypePath
|
||||
ENV ${FREETYPE_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
if (NOT _FREETYPE_INCLUDE_DIRS STREQUAL "")
|
||||
set (FREETYPE_INCLUDE_DIR ${_FREETYPE_INCLUDE_DIRS})
|
||||
else()
|
||||
find_path(FREETYPE_INCLUDE_DIR
|
||||
NAMES ft2build.h
|
||||
HINTS
|
||||
${_FREETYPE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FreetypePath
|
||||
ENV ${FREETYPE_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
endif()
|
||||
|
||||
find_library(FREETYPE_LIB
|
||||
NAMES ${_FREETYPE_LIBRARIES} freetype libfreetype
|
||||
|
Loading…
x
Reference in New Issue
Block a user