diff --git a/CMakeLists.txt b/CMakeLists.txt index 916e548..8744cb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ elseif(SYSTEM.Linux) elseif(SYSTEM.Windows) # Statically link UCRT if(NOT DOBBY_DEBUG) - if(COMPILER.Gcc) + if(COMPILER.Gcc OR COMPILER.Clang) add_compile_options(-MT) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MT") else() @@ -113,7 +113,7 @@ elseif(SYSTEM.Windows) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT") endif() else() - if(COMPILER.Gcc) + if(COMPILER.Gcc OR COMPILER.Clang) add_compile_options(-MTd) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -MTd") else() @@ -137,7 +137,7 @@ elseif(SYSTEM.Windows) if (NearBranch) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /export:dobby_enable_near_branch_trampoline /export:dobby_disable_near_branch_trampoline") endif() - elseif(COMPILER.Gcc) + elseif(COMPILER.Gcc OR Compiler.Clang) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-rtti") # Enable unicode, Statically link libgcc/libstdc++ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -municode") @@ -504,4 +504,3 @@ if(SYSTEM.Darwin) endif() add_subdirectory(example) -