Fix compilation on Windows

git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1382 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
ximion
2012-01-05 21:31:03 +00:00
parent a2a431ad67
commit 38a07b197c
6 changed files with 13 additions and 5 deletions

View File

@ -179,7 +179,7 @@ IF(USE_OPENMP AND SUPPORTS_OPENMP)
ENDIF(USE_OPENMP AND SUPPORTS_OPENMP)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${FTGL_INCLUDE_DIRS} ${Renderer_SOURCE_DIR} ${PRESET_FACTORY_SOURCES})
LINK_DIRECTORIES(${FTGL_LINK_DIRS} ${Renderer_BINARY_DIR} ${PRESET_FACTORY_BINARY_DIR})
LINK_DIRECTORIES(${FTGL_LIBRARY_DIRS} ${Renderer_BINARY_DIR} ${PRESET_FACTORY_BINARY_DIR})
if(MSVC)
SET (MATH_LIBRARIES )

View File

@ -3,6 +3,7 @@
#include <math.h>
#include <cassert>
#include <iostream>
#include <cmath>
#include "Renderer/BeatDetect.hpp"
PresetInputs::PresetInputs() : PipelineContext()
@ -195,7 +196,7 @@ void PresetOutputs::PerPixelMath(const PipelineContext &context)
{
for (y = 0; y < gy; y++)
{
fZoom2 = powf(this->zoom_mesh[x][y], powf(this->zoomexp_mesh[x][y],
fZoom2 = std::pow(this->zoom_mesh[x][y], std::pow(this->zoomexp_mesh[x][y],
rad_mesh[x][y] * 2.0f - 1.0f));
fZoom2Inv = 1.0f / fZoom2;
this->x_mesh[x][y] = this->orig_x[x][y] * 0.5f * fZoom2Inv + 0.5f;

View File

@ -10,6 +10,7 @@ SET(NativePresetFactory_SOURCES NativePresetFactory.cpp)
IF(NOT MSVC)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF(NOT MSVC)
find_library(DL_LIBRARIES dl)
if(MSVC)
SET (MATH_LIBRARIES )
@ -20,4 +21,4 @@ endif(MSVC)
INCLUDE_DIRECTORIES(${projectM_SOURCE_DIR} ${Renderer_SOURCE_DIR})
ADD_LIBRARY(NativePresetFactory STATIC ${NativePresetFactory_SOURCES})
SET_TARGET_PROPERTIES(NativePresetFactory PROPERTIES VERSION 2.00 SOVERSION 2)
TARGET_LINK_LIBRARIES(NativePresetFactory Renderer ${MATH_LIBRARIES} dl)
TARGET_LINK_LIBRARIES(NativePresetFactory Renderer ${MATH_LIBRARIES} ${DL_LIBRARIES})

View File

@ -10,7 +10,10 @@
//
//
#include <dlfcn.h>
extern "C" {
# include <dlfcn.h>
}
#include "NativePresetFactory.hpp"
typedef void Handle;

View File

@ -30,3 +30,4 @@ TARGET_LINK_LIBRARIES(Renderer ${MATH_LIBRARIES}
${CG_LINK_TARGETS}
${FREETYPE2_LIBRARIES}
)
set_target_properties(Renderer PROPERTIES COMPILE_FLAGS "-Wno-parentheses")

View File

@ -16,6 +16,8 @@
#include <OpenGL/gl.h>
#endif
#include <cmath>
#include "MilkdropWaveform.hpp"
#include "math.h"
#include "BeatDetect.hpp"
@ -124,7 +126,7 @@ void MilkdropWaveform::MaximizeColors(RenderContext &context)
case 2048: temp_a *= 0.33f; break;
}
temp_a*=1.3f;
temp_a*=powf(context.beatDetect->treb , 2.0f);
temp_a*=std::pow(context.beatDetect->treb , 2.0f);
}
if (maximizeColors==true)