Permalink
Browse files

These definitions are needed to compile with Visual C++

Also choose to use the non DLL version of the Visual C++ runtime library, so that the runtime library is staticly linked
  • Loading branch information...
1 parent 6468274 commit 4b0ec402068b1ad3b2d764c10d8f4db1e427a45c @mozinator mozinator committed with timblechmann Dec 13, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 CMakeLists.txt
View
@@ -52,7 +52,11 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
endif()
if(WIN32)
- add_definitions("-DSC_WIN32")
+ set_property(DIRECTORY
+ APPEND
+ PROPERTY COMPILE_DEFINITIONS SC_WIN32 NOMINMAX _WINSOCKAPI_)
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELEASE} /MTd")
+ SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} /MT")
endif()

0 comments on commit 4b0ec40

Please sign in to comment.