Skip to content

Commit

Permalink
Merge pull request #1988 from sewbacca/fix/mingw-utf16
Browse files Browse the repository at this point in the history
MinGW: Adapt to utf-16 encoded love.rc
  • Loading branch information
slime73 authored Nov 29, 2023
2 parents 696007e + 76fcc5b commit 30009db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1777,6 +1777,12 @@ if(MSVC OR MINGW)
extra/windows/love.rc
extra/windows/love.ico
)

if(MINGW)
# UTF-16 flags passed to windres. windres invokes gcc as preprocessor
# -> gcc outputs utf8, so windres must read-in codepage 65001 (utf8)
set(CMAKE_RC_FLAGS ${CMAKE_RC_FLAGS} "-c 65001 --preprocessor-arg=-finput-charset=UTF-16LE")
endif()
endif()

add_library(${LOVE_LIB_NAME} SHARED ${LOVE_LIB_SRC} ${LOVE_RC})
Expand Down

0 comments on commit 30009db

Please sign in to comment.