From d39030457710cc4e2c3caba1c4cb8cadc223a2d4 Mon Sep 17 00:00:00 2001 From: neru Date: Sat, 20 Jun 2026 07:03:01 -0300 Subject: [PATCH] build: misc cmakelist fixes --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e13d1e6..5d1b748 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,14 +11,13 @@ add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX) project(hex-unlocked LANGUAGES CXX) set_property(GLOBAL PROPERTY USE_FOLDERS ON) -if(MSVC) +enable_language(RC) + +if(CMAKE_GENERATOR MATCHES "Visual Studio") add_compile_options(/EHsc /utf-8 /Zc:char8_t) - if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") - add_compile_definitions(_AMD64_) - endif() else() add_compile_options(-m64) - enable_language(RC) + add_link_options(-static -static-libgcc -static-libstdc++) endif() # ------------------------------ @@ -38,7 +37,6 @@ endif() # msvc stuff # ------------------------------ if(CMAKE_GENERATOR MATCHES "Visual Studio") - string(APPEND CMAKE_CXX_FLAGS " /EHsc /DWIN32_LEAN_AND_MEAN /utf-8 /Zc:char8_t") if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64") string(APPEND CMAKE_CXX_FLAGS " /D_AMD64_") elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")