Skip to content

Commit

Permalink
fix: enable utf-8 support on msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMcAvoy committed Nov 13, 2024
1 parent 81a1827 commit 9f5a7c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ project(megatest)

add_subdirectory(libs)

# binary
file(GLOB_RECURSE SOURCES "src/*.cpp")
add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME}
Expand Down
6 changes: 6 additions & 0 deletions libs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
cmake_minimum_required(VERSION 3.5)

if (MSVC)
message("[megasource] MSVC detected, enabling /utf-8")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
endif()

# --- GLFW ---
add_subdirectory(glfw)

Expand Down

0 comments on commit 9f5a7c4

Please sign in to comment.