Skip to content

Commit

Permalink
Fixed warnings in CI related to copying freetype dll on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Dec 22, 2024
1 parent 9598e60 commit f46dbfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# If the cmake version is higher than the minimum version then enable all new policies, up to the maximum version specified.
# When cmake is newer than the highest version then its newest policies will still be set to the old behavior for compatibility.
cmake_minimum_required(VERSION 3.16...3.29)
cmake_minimum_required(VERSION 3.16...3.31)

# Include macros such as tgui_set_option
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Macros.cmake)
Expand Down
10 changes: 9 additions & 1 deletion cmake/Macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,16 @@ function(copy_dlls_to_exe post_build_destination install_destination target)
list(APPEND files_to_copy "$<TARGET_FILE:tgui>")
endif()

# Copy the FreeType dll if needed and when we know where it is
# Copy the FreeType dll if needed and if we know where it is
if(TGUI_HAS_FONT_BACKEND_FREETYPE AND FREETYPE_WINDOWS_BINARIES_PATH AND NOT TGUI_USE_STATIC_STD_LIBS)
# Turn backslashes into slashes on Windows, because the install() command can fail if the
# FREETYPE_WINDOWS_BINARIES_PATH variable was initialized with an environment variable that contains backslashes.
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.20)
cmake_path(SET FREETYPE_WINDOWS_BINARIES_PATH "${FREETYPE_WINDOWS_BINARIES_PATH}")
else()
file(TO_CMAKE_PATH "${FREETYPE_WINDOWS_BINARIES_PATH}" FREETYPE_WINDOWS_BINARIES_PATH)
endif()

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(freetype_dll "${FREETYPE_WINDOWS_BINARIES_PATH}/release dll/win64/freetype.dll")
else()
Expand Down

0 comments on commit f46dbfd

Please sign in to comment.