This commit is contained in:
gamagan 2024-05-27 12:51:34 +08:00 committed by GitHub
commit 631a15d996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -258,7 +258,14 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
endif() endif()
if (GLFW_BUILD_WIN32) if (GLFW_BUILD_WIN32)
target_compile_definitions(glfw PRIVATE UNICODE _UNICODE) # If requested, create a C #define to set the app's window class name.
# This class name is baked in at compile time.
set(_GLFW_WCN "")
if (GLFW_WNDCLASSNAME)
set(_GLFW_WCN "_GLFW_WNDCLASSNAME=L\"${GLFW_WNDCLASSNAME}\"")
endif()
target_compile_definitions(glfw PRIVATE UNICODE _UNICODE ${_GLFW_WCN})
endif() endif()
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before # HACK: When building on MinGW, WINVER and UNICODE need to be defined before