Skip to content
/ snoretoast Public

Commit 13fc05a

Browse files
committed
link msvc runtime statically
1 parent 36888b2 commit 13fc05a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ cmake_minimum_required(VERSION 2.8)
44

55
add_definitions(-DUNICODE -D_UNICODE )
66

7+
#link runtime static
8+
if(MSVC)
9+
foreach(_bt DEBUG RELEASE RELWITHDEBINFO)
10+
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_${_bt} ${CMAKE_CXX_FLAGS_${_bt}})
11+
endforeach(_bt DEBUG RELEASE RELWITHDEBINFO)
12+
endif(MSVC)
713

814
add_subdirectory(data)
915
add_subdirectory(src)

0 commit comments

Comments
 (0)