Skip to content

Commit 2979ba2

Browse files
committed
fix: scope CMAKE_POLICY_DEFAULT_CMP0091 to each FetchContent
1 parent 78884dc commit 2979ba2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ endif()
77
project(VEFontCache LANGUAGES C CXX)
88

99
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
10-
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
1110

1211
set(CMAKE_CXX_STANDARD 20)
1312
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -35,17 +34,21 @@ if(VEFC_ENABLE_FREETYPE)
3534
if(POLICY CMP0077)
3635
cmake_policy(SET CMP0077 NEW)
3736
endif()
37+
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
3838
FetchContent_MakeAvailable(freetype)
39+
unset(CMAKE_POLICY_DEFAULT_CMP0091)
3940
endif()
4041

4142
if(VEFC_ENABLE_HARFBUZZ)
43+
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
4244
FetchContent_Declare(
4345
harfbuzz
4446
GIT_REPOSITORY https://github.com/harfbuzz/harfbuzz.git
4547
GIT_TAG 11.2.1
4648
)
4749
set(HB_BUILD_SUBSET OFF CACHE BOOL "" FORCE)
4850
FetchContent_MakeAvailable(harfbuzz)
51+
unset(CMAKE_POLICY_DEFAULT_CMP0091)
4952
endif()
5053

5154
if(VEFC_BUILD_DEMO OR VEFC_BUILD_VRHI)

0 commit comments

Comments
 (0)