mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Merge pull request #494 from Jayman2000/encoding-improvements
Ensure UTF-8 is used in more places
This commit is contained in:
commit
7cd7902584
@ -5,6 +5,7 @@ indent_style = space
|
||||
indent_size = 2
|
||||
tab_width = 8
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
spelling_language = en-US
|
||||
|
||||
[*.md]
|
||||
|
@ -28,6 +28,21 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/source-charset:UTF-8 /execution-charset:UTF-8)
|
||||
else()
|
||||
add_compile_options(-finput-charset=UTF-8)
|
||||
# Unfortunately, Clang doesn’t support -fexec-charset yet so this next part
|
||||
# is GCC only. Luckily, Clang defaults to using UTF-8 for the execution
|
||||
# character set [1], so we’re fine. Once Clang gets support for
|
||||
# -fexec-charset, we should probably start using it.
|
||||
#
|
||||
# [1]: <https://discourse.llvm.org/t/rfc-enabling-fexec-charset-support-to-llvm-and-clang-reposting/71512>
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-fexec-charset=UTF-8)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FORCE_COLORED_OUTPUT)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
|
||||
set(CMAKE_COLOR_DIAGNOSTICS ON)
|
||||
|
@ -274,6 +274,13 @@ set(CPPS
|
||||
if(WIN32)
|
||||
set(PLATFORM_LIBS wsock32.lib winmm.lib)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB:LIBC")
|
||||
set(MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/Descent3.exe.manifest)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Descent3.exe.manifest.in
|
||||
${MANIFEST}
|
||||
@ONLY
|
||||
NEWLINE_STYLE WIN32
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
@ -287,7 +294,7 @@ endif()
|
||||
|
||||
file(GLOB_RECURSE INCS "../lib/*.h")
|
||||
|
||||
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS})
|
||||
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS} ${MANIFEST})
|
||||
target_link_libraries(Descent3 PRIVATE
|
||||
2dlib AudioEncode bitmap cfile czip d3music dd_video ddebug ddio libmve libacm
|
||||
fix grtext manage mem misc model module movie stream_audio linux SDL2::SDL2
|
||||
|
9
Descent3/Descent3.exe.manifest.in
Normal file
9
Descent3/Descent3.exe.manifest.in
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity type="win32" name="DescentDevelopers.Descent3.engine" version="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.0" />
|
||||
<application>
|
||||
<windowsSettings>
|
||||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
Loading…
Reference in New Issue
Block a user