Compare commits

...

2 Commits

Author SHA1 Message Date
gamagan
258c6399dc
Merge 2d4d867a91 into acb92944d4 2025-08-19 20:50:52 +10:00
gamagan
2d4d867a91
Allow setting the App's window class name via CMake
Allow setting the App's window class name via the CMake command line:
    cmake . -DGLFW_WNDCLASSNAME="MyWindowClassName"
2023-09-11 05:48:33 -04:00

View File

@ -252,7 +252,14 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
endif()
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()
# Workaround for the MS CRT deprecating parts of the standard library