Changeset 105


Ignore:
Timestamp:
11/08/06 20:53:41 (17 years ago)
Author:
zorg
Message:

Fix cmake compilation on win32 (both for msvc & mingw/cygwin). It's still advised to use custom msvc projects with msvc compilers though

Location:
mppenc/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mppenc/trunk/CMakeLists.txt

    r97 r105  
    22project(mppenc C)
    33set(CMAKE_VERBOSE_MAKEFILE false)
    4 set(CMAKE_C_FLAGS "-fno-strict-aliasing -Os -fomit-frame-pointer -pipe")
     4
     5if(NOT MSVC)
     6set(CMAKE_C_FLAGS "-fno-strict-aliasing -Os -fomit-frame-pointer -pipe")
     7endif(NOT MSVC)
     8
    59add_subdirectory(src)
  • mppenc/trunk/src/CMakeLists.txt

    r100 r105  
    11add_definitions(-DMPP_ENCODER -DFAST_MATH -DCVD_FASTLOG)
    22add_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)
     3
     4if(WIN32)
     5target_link_libraries(mppenc winmm)
     6endif(WIN32)
     7
     8if(NOT MSVC)
    39target_link_libraries(mppenc m)
     10endif(NOT MSVC)
     11
    412if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
    513target_link_libraries(mppenc ossaudio)
    614endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
     15
    716install(TARGETS mppenc RUNTIME DESTINATION bin)
  • mppenc/trunk/src/mppenc.h

    r97 r105  
    2020#ifndef MPPENC_MPPENC_H
    2121#define MPPENC_MPPENC_H
    22 
    23 #ifdef _WIN32
    24 # define CVD_FASTLOG
    25 # define FAST_MATH
    26 #endif
    2722
    2823#include "mppdec.h"
  • mppenc/trunk/win32/mppenc.vcproj

    r97 r105  
    4141                                Name="VCCLCompilerTool"
    4242                                Optimization="0"
    43                                 PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
     43                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER;CVD_FASTLOG;FAST_MATH"
    4444                                ExceptionHandling="0"
    4545                                BasicRuntimeChecks="3"
     
    123123                        <Tool
    124124                                Name="VCCLCompilerTool"
    125                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER"
     125                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;MPP_ENCODER;CVD_FASTLOG;FAST_MATH"
    126126                                ExceptionHandling="0"
    127127                                RuntimeLibrary="0"
Note: See TracChangeset for help on using the changeset viewer.