Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
if(MSVC)
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
add_compile_options(/arch:SSE2)
# Pin both charsets. Sources are UTF-8; narrow string literals are Windows-1252,
# because the .vf bitmap fonts are indexed by Windows-1252 byte value and several
# literals embed those bytes directly (\x95 bullet, \xA6 chat prefix, ...).
# Without this the ordinary literal encoding follows the build machine's system
# code page: on a DBCS locale such as 932 those bytes become invalid multi-byte
# sequences and std::format throws std::format_error at runtime.
add_compile_options(/source-charset:utf-8 /execution-charset:windows-1252)
# Statically link Microsoft's CRT.
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
add_compile_options(-msse2)
add_compile_options(-finput-charset=UTF-8 -fexec-charset=WINDOWS-1252)
endif()

# Macros
Expand Down Expand Up @@ -81,6 +73,19 @@ macro(setup_debug_info target)
endmacro()

add_subdirectory(vendor)

# Pin both charsets for Alpine Faction's own code. Sources are UTF-8; narrow string literals are Windows-1252,
# because the .vf bitmap fonts are indexed by Windows-1252 byte value and several literals embed those bytes
# directly (\x95 bullet, \xA6 chat prefix, ...). Without this the ordinary literal encoding follows the build
# machine's system code page: on a DBCS locale such as 932 those bytes become invalid multi-byte sequences and
# std::format throws std::format_error at runtime.
# This is applied AFTER vendor/ so third-party code keeps its own charset settings.
if(MSVC)
add_compile_options(/source-charset:utf-8 /execution-charset:windows-1252)
else()
add_compile_options(-finput-charset=UTF-8 -fexec-charset=WINDOWS-1252)
endif()

add_subdirectory(launcher_common)
add_subdirectory(launcher)
add_subdirectory(common)
Expand Down
Loading