Index: /mppenc/trunk/CMakeLists.txt
===================================================================
--- /mppenc/trunk/CMakeLists.txt	(revision 104)
+++ /mppenc/trunk/CMakeLists.txt	(revision 105)
@@ -2,4 +2,8 @@
 project(mppenc C)
 set(CMAKE_VERBOSE_MAKEFILE false)
-set(CMAKE_C_FLAGS "-fno-strict-aliasing -Os -fomit-frame-pointer -pipe") 
+
+if(NOT MSVC)
+set(CMAKE_C_FLAGS "-fno-strict-aliasing -Os -fomit-frame-pointer -pipe")
+endif(NOT MSVC)
+
 add_subdirectory(src)
Index: /mppenc/trunk/src/CMakeLists.txt
===================================================================
--- /mppenc/trunk/src/CMakeLists.txt	(revision 104)
+++ /mppenc/trunk/src/CMakeLists.txt	(revision 105)
@@ -1,7 +1,16 @@
 add_definitions(-DMPP_ENCODER -DFAST_MATH -DCVD_FASTLOG)
 add_executable(mppenc analy_filter encode_sv7 huffsv7 profile stderr winmsg ans fastmath keyboard psy tags bitstream fft4g mppenc psy_tab tools cvd fft_routines pipeopen quant wave_in)
+
+if(WIN32)
+target_link_libraries(mppenc winmm)
+endif(WIN32)
+
+if(NOT MSVC)
 target_link_libraries(mppenc m)
+endif(NOT MSVC)
+
 if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
 target_link_libraries(mppenc ossaudio)
 endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
+
 install(TARGETS mppenc RUNTIME DESTINATION bin)
Index: /mppenc/trunk/src/mppenc.h
===================================================================
--- /mppenc/trunk/src/mppenc.h	(revision 104)
+++ /mppenc/trunk/src/mppenc.h	(revision 105)
@@ -20,9 +20,4 @@
 #ifndef MPPENC_MPPENC_H
 #define MPPENC_MPPENC_H
-
-#ifdef _WIN32
-# define CVD_FASTLOG
-# define FAST_MATH
-#endif
 
 #include "mppdec.h"
Index: /mppenc/trunk/win32/mppenc.vcproj
===================================================================
--- /mppenc/trunk/win32/mppenc.vcproj	(revision 104)
+++ /mppenc/trunk/win32/mppenc.vcproj	(revision 105)
@@ -41,5 +41,5 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER;CVD_FASTLOG;FAST_MATH"
 				ExceptionHandling="0"
 				BasicRuntimeChecks="3"
@@ -123,5 +123,5 @@
 			<Tool
 				Name="VCCLCompilerTool"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER;CVD_FASTLOG;FAST_MATH"
 				ExceptionHandling="0"
 				RuntimeLibrary="0"
