Skip to content

Commit 06e7176

Browse files
Fix GLEW detection for FetchContent path (#51)
* Fix GLEW detection for FetchContent path * Less warnings on missing libs
1 parent 5959979 commit 06e7176

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

cmake/Dependencies/Freetype/Freetype.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ if(NOT (Freetype_FOUND OR TARGET freetype))
1414
cmake_minimum_required(VERSION 3.11)
1515
include(FetchContent)
1616
set(SKIP_INSTALL_HEADERS ON CACHE BOOL "Skip installing FreeType headers")
17+
set(FT_DISABLE_ZLIB ON CACHE BOOL "Disable use of system zlib and use internal zlib library instead.")
18+
set(FT_DISABLE_HARFBUZZ ON CACHE BOOL "Disable HarfBuzz (used for improving auto-hinting of OpenType fonts).")
19+
set(FT_DISABLE_PNG ON CACHE BOOL "Disable support of PNG compressed OpenType embedded bitmaps.")
20+
set(FT_DISABLE_ZLIB ON CACHE BOOL "Disable FreeType dependence on HarfBuzz")
21+
set(FT_DISABLE_BZIP2 ON CACHE BOOL "Disable support of bzip2 compressed fonts.")
22+
set(FT_DISABLE_BROTLI ON CACHE BOOL "Disable support of compressed WOFF2 fonts.")
1723
FetchContent_Declare(
1824
freetype-external
1925
GIT_REPOSITORY https://github.com/freetype/freetype.git

cmake/Dependencies/GLEW/GLEW.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if(NOT DEPENDENCIES_FORCE_DOWNLOAD AND NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/_
22
find_package(GLEW)
33
endif()
44

5-
if(NOT (GLEW_FOUND OR TARGET glew))
5+
if(NOT (TARGET GLEW::GLEW OR TARGET glew))
66
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/_deps/glew-external-src")
77
if(DEPENDENCIES_FORCE_DOWNLOAD)
88
message(STATUS "DEPENDENCIES_FORCE_DOWNLOAD is ON. Fetching GLEW.")

0 commit comments

Comments
 (0)