Commit e2ea86d8 authored by Martin Storsjö's avatar Martin Storsjö

contrib: projectM: Don't force building in C++98 mode

Instead patch the project to fix the error that was clang gave when
building in C+11 mode (which clang 6 does by default):

Renderer/VideoEcho.cpp:77:30: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing]
  float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},
parent 4b5b85f7
diff -urN projectM-orig/Renderer/VideoEcho.cpp projectM/Renderer/VideoEcho.cpp
--- projectM-orig/Renderer/VideoEcho.cpp 2009-12-06 03:42:51.000000000 +0200
+++ projectM/Renderer/VideoEcho.cpp 2018-03-29 23:56:45.852289647 +0300
@@ -74,10 +74,10 @@
default: flipx=1;flipy=1; break;
}
- float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},
- {-0.5*flipx, 0.5*flipy},
- { 0.5*flipx, 0.5*flipy},
- { 0.5*flipx, -0.5*flipy}};
+ float pointsFlip[4][2] = {{-0.5f*flipx, -0.5f*flipy},
+ {-0.5f*flipx, 0.5f*flipy},
+ { 0.5f*flipx, 0.5f*flipy},
+ { 0.5f*flipx, -0.5f*flipy}};
glVertexPointer(2,GL_FLOAT,0,pointsFlip);
glDrawArrays(GL_TRIANGLE_FAN,0,4);
......@@ -23,6 +23,7 @@ ifdef HAVE_WIN32
$(APPLY) $(SRC)/projectM/win32.patch
endif
$(APPLY) $(SRC)/projectM/gcc6.patch
$(APPLY) $(SRC)/projectM/clang6.patch
$(MOVE)
DEPS_projectM = glew $(DEPS_glew)
......@@ -35,7 +36,6 @@ DEPS_projectM = glew $(DEPS_glew)
-DUSE_FTGL:BOOL=OFF \
-DINCLUDE-PROJECTM-PULSEAUDIO:BOOL=OFF \
-DINCLUDE-PROJECTM-QT:BOOL=OFF \
-DCMAKE_CXX_STANDARD=98 \
-DBUILD_PROJECTM_STATIC:BOOL=ON .
cd $< && $(MAKE) install
-cd $<; cp Renderer/libRenderer.a MilkdropPresetFactory/libMilkdropPresetFactory.a $(PREFIX)/lib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment