From 5a40f70a60b71229dfc787674f7b19c7ea50d97d Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 20:44:00 +0200 Subject: [PATCH 01/15] Fix #460 - texture2D is renamed texture --- src/libprojectM/FileScanner.cpp | 1 - src/libprojectM/Renderer/StaticGlShaders.cpp | 26 ++++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/libprojectM/FileScanner.cpp b/src/libprojectM/FileScanner.cpp index 1a87789ffc..860d2a3044 100644 --- a/src/libprojectM/FileScanner.cpp +++ b/src/libprojectM/FileScanner.cpp @@ -13,7 +13,6 @@ FileScanner::FileScanner(std::vector &rootDirs, std::vector Date: Sat, 13 Feb 2021 20:44:53 +0200 Subject: [PATCH 02/15] fmt --- src/libprojectM/Renderer/StaticGlShaders.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libprojectM/Renderer/StaticGlShaders.cpp b/src/libprojectM/Renderer/StaticGlShaders.cpp index 7522ae76ae..cca2c881bb 100644 --- a/src/libprojectM/Renderer/StaticGlShaders.cpp +++ b/src/libprojectM/Renderer/StaticGlShaders.cpp @@ -677,16 +677,16 @@ void main(){ vec3 blur = (texture(texture_sampler, uv2 + vec2(d1 * srctexsize.z, 0)).xyz + -texture(texture_sampler, uv2 + vec2(-d1 * srctexsize.z, 0)).xyz) * + texture(texture_sampler, uv2 + vec2(-d1 * srctexsize.z, 0)).xyz) * w1 + (texture(texture_sampler, uv2 + vec2(d2 * srctexsize.z, 0)).xyz + -texture(texture_sampler, uv2 + vec2(-d2 * srctexsize.z, 0)).xyz) * + texture(texture_sampler, uv2 + vec2(-d2 * srctexsize.z, 0)).xyz) * w2 + (texture(texture_sampler, uv2 + vec2(d3 * srctexsize.z, 0)).xyz + -texture(texture_sampler, uv2 + vec2(-d3 * srctexsize.z, 0)).xyz) * + texture(texture_sampler, uv2 + vec2(-d3 * srctexsize.z, 0)).xyz) * w3 + (texture(texture_sampler, uv2 + vec2(d4 * srctexsize.z, 0)).xyz + -texture(texture_sampler, uv2 + vec2(-d4 * srctexsize.z, 0)).xyz) * + texture(texture_sampler, uv2 + vec2(-d4 * srctexsize.z, 0)).xyz) * w4; blur.xyz *= w_div; From eb9f707b51acb94999d7cbe29d136f4ccf223454 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 20:53:56 +0200 Subject: [PATCH 03/15] makefile --- Makefile.am | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 060cd193a6..bc43645b72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,13 +39,12 @@ build-mac: macOS/Build/Products/Debug/presets @echo "Products built in macOS/Build/Products/Debug" open macOS/Build/Products/Debug +ProjectM.pkg: + xcrun xcodebuild -scheme "ProjectM Installer" -configuration Release archive -archivePath build/ProjectM.xcarchive + # do a macOS build -dist-mac: - ./autogen.sh - make clean - ./configure --disable-sdlframework +dist-mac: dist ProjectM.pkg rm -rf dist - xcrun xcodebuild -scheme "ProjectM Installer" -configuration Release archive -archivePath build/ProjectM.xcarchive mkdir -p dist mv ProjectM.pkg dist/projectM-macOS.pkg mv projectM-*.tar.gz dist/ From 2e9796a7b14ba8e4923e507f13bf58574080bb5c Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 20:56:02 +0200 Subject: [PATCH 04/15] wip --- src/projectM-sdl/sdl2 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 src/projectM-sdl/sdl2 diff --git a/src/projectM-sdl/sdl2 b/src/projectM-sdl/sdl2 deleted file mode 160000 index 1a63a60d62..0000000000 --- a/src/projectM-sdl/sdl2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1a63a60d62f0a447d9015eeae0203be19d236ff9 From 29fd0515ac040b52dcdc348eada1b51015bbae7e Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 20:56:19 +0200 Subject: [PATCH 05/15] wip --- src/projectM-sdl/sdl2 | 1 + 1 file changed, 1 insertion(+) create mode 160000 src/projectM-sdl/sdl2 diff --git a/src/projectM-sdl/sdl2 b/src/projectM-sdl/sdl2 new file mode 160000 index 0000000000..1a63a60d62 --- /dev/null +++ b/src/projectM-sdl/sdl2 @@ -0,0 +1 @@ +Subproject commit 1a63a60d62f0a447d9015eeae0203be19d236ff9 From 785c3f849900e05cf0db5a23946328c5f9259f83 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:04:08 +0200 Subject: [PATCH 06/15] wip --- .gitmodules | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index f3eb523f20..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "src/projectM-sdl/sdl2"] - path = src/projectM-sdl/sdl2 - url = https://github.com/libsdl-org/SDL.git - ignore = untracked From 68734250471d9035cce6d8099f2ad192eb9a8317 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:08:02 +0200 Subject: [PATCH 07/15] wip --- .gitmodules | 3 +++ src/projectM-sdl/sdl2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..f4a2b546ae --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/projectM-sdl/sdl2"] + path = src/projectM-sdl/sdl2 + url = https://github.com/libsdl-org/SDL.git diff --git a/src/projectM-sdl/sdl2 b/src/projectM-sdl/sdl2 index 1a63a60d62..67a9d6ba98 160000 --- a/src/projectM-sdl/sdl2 +++ b/src/projectM-sdl/sdl2 @@ -1 +1 @@ -Subproject commit 1a63a60d62f0a447d9015eeae0203be19d236ff9 +Subproject commit 67a9d6ba98fdba24c44fbf59928a5213fcaccafa From e89bad19d6bbe6f37a23a0a5ca7028f7f760c375 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:10:34 +0200 Subject: [PATCH 08/15] wip --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index f4a2b546ae..a633dea40e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "src/projectM-sdl/sdl2"] path = src/projectM-sdl/sdl2 url = https://github.com/libsdl-org/SDL.git + ignore = untracked \ No newline at end of file From c05c671e009a0c5751a09529abb4465534ec2f18 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:16:42 +0200 Subject: [PATCH 09/15] intrinsics.h --- src/libprojectM/Intrinsics.h | 4 ---- src/libprojectM/Makefile.am | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libprojectM/Intrinsics.h b/src/libprojectM/Intrinsics.h index ac825f470c..f504e04e56 100644 --- a/src/libprojectM/Intrinsics.h +++ b/src/libprojectM/Intrinsics.h @@ -13,8 +13,4 @@ #define _HAS_SSE2_ 1 #endif -#ifdef __arm64__ -#undef _HAS_SSE2_ -#endif - #endif /* PRJMIntrinsics_h */ diff --git a/src/libprojectM/Makefile.am b/src/libprojectM/Makefile.am index 5c084bc99c..b534f72020 100644 --- a/src/libprojectM/Makefile.am +++ b/src/libprojectM/Makefile.am @@ -29,7 +29,7 @@ libprojectM_la_SOURCES = ConfigFile.cpp Preset.cpp PresetLoader.cpp timer.cpp \ HungarianMethod.hpp Preset.hpp RandomNumberGenerators.hpp\ IdleTextures.hpp PresetChooser.hpp TimeKeeper.hpp\ KeyHandler.hpp PresetFactory.hpp projectM.hpp\ - BackgroundWorker.h \ + BackgroundWorker.h Intrinsics.h \ PCM.hpp PresetFactoryManager.hpp\ projectM.hpp projectM-opengl.h \ ConfigFile.h \ From 1d88f6c65c97a1dae9ac900f5d6d93e9eb099224 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:31:22 +0200 Subject: [PATCH 10/15] readme --- .travis.yml | 5 +---- BUILDING.md | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed113dc272..53fa34e057 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ addons: apt: packages: - libc++-dev - - libsdl2-dev - libgl1-mesa-dev script: @@ -48,7 +47,6 @@ matrix: - libjack-dev - libpulse-dev - libc++-dev - - libsdl2-dev env: - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" - os: linux @@ -62,7 +60,6 @@ matrix: - libjack-dev - libpulse-dev - libc++-dev - - libsdl2-dev env: - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" @@ -70,7 +67,7 @@ matrix: - os: osx osx_image: xcode12.2 env: - - MATRIX_EVAL="brew update && brew install sdl2" + - MATRIX_EVAL="" notifications: email: diff --git a/BUILDING.md b/BUILDING.md index 2e0c9d4dd5..35df6e335a 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -11,7 +11,7 @@ Main build options & their requirements: | Configure flag | Required dependency | Produced binary | |-----------------------|----------------------------------------------------------------------------------------|-----------------------| -| `--enable-sdl` | `libsdl2-dev` | `projectMSDL` | +| `--enable-sdl` | (submodule in src/projectm-sdl/sdl2) | `projectMSDL` | | `--enable-pulseaudio` | `qt5-default` `qtdeclarative5-dev` `libpulse-dev` `libqt5opengl5-dev` | `projectM-pulseaudio` | | `--enable-jack` | `libjack2-dev`OR`libjack1-dev`; `qt5-default` `qtdeclarative5-dev` `libqt5opengl5-dev` | `projectM-jack` | @@ -20,6 +20,7 @@ Main build options & their requirements: * A modified version of `hlslparser` is included in Renderer and used to transpile HLSL shaders to GLSL * OpenGL 3+ or OpenGLES is required * `libsdl >= 2.0.5` is required for the SDL and emscripten apps. `src/projectM-sdl` is the current reference application implementation. maybe try getting that to build and run as your testbench. +* SDL2 is now provided as a submodule If extra information needed - you can refere to `configure.ac` and the assorted `Makefile.am` files. @@ -34,7 +35,7 @@ sudo make install ### Debian/Ubuntu/Mint ```sh -sudo apt install clang libsdl2-dev libgl1-mesa-dev qt5-default qtdeclarative5-dev libqt5opengl5-dev libjack-dev libpulse-dev +sudo apt install clang libgl1-mesa-dev qt5-default qtdeclarative5-dev libqt5opengl5-dev libjack-dev libpulse-dev ./configure && make -j4 && sudo make install ``` From 79a2160eb77e8c6d503516f8bdd67f71a8b6496a Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:52:05 +0200 Subject: [PATCH 11/15] wip --- .travis.yml | 9 ++++++--- configure.ac | 27 ++++++++++++++++++++++++--- src/Makefile.am | 6 +++++- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 53fa34e057..cde7499987 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ addons: packages: - libc++-dev - libgl1-mesa-dev + - libsdl2-dev script: - ./configure $PM_OPTS --prefix=$PWD/local && make -j6 && make install # build from checkout @@ -47,8 +48,9 @@ matrix: - libjack-dev - libpulse-dev - libc++-dev + - libsdl2-dev env: - - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" + - MATRIX_EVAL="PM_OPTS=\"--enable-test --enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" - os: linux dist: xenial addons: @@ -60,14 +62,15 @@ matrix: - libjack-dev - libpulse-dev - libc++-dev + - libsdl2-dev env: - - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" + - MATRIX_EVAL="PM_OPTS=\"--enable-test --enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" # osx/xcode/clang - os: osx osx_image: xcode12.2 env: - - MATRIX_EVAL="" + - MATRIX_EVAL="--enable-test" notifications: email: diff --git a/configure.ac b/configure.ac index e8625e5bf8..b06d10aa78 100644 --- a/configure.ac +++ b/configure.ac @@ -83,9 +83,29 @@ AC_CONFIG_FILES([ src/projectM-test/Makefile ]) +AC_ARG_ENABLE([test], +AS_HELP_STRING([--enable-test], [Unit tests]), [], [enable_test=no]) +AS_IF([test "x$enable_test" = "xyes"], [ + PKG_CHECK_MODULES([SDL], [sdl2], [ + m4_include([m4/sdl2.m4]) + SDL_VERSION="2.0.5" + AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care + AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care + + # Check for libSDL >= $SDL_VERSION + AM_PATH_SDL2($SDL_VERSION, + [enable_test=yes], + [AS_IF([test "$enable_test" = "yes"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])); enable_sdl=no]) + ], + [ + # not found + AS_IF([test "$enable_test" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) + enable_test=no + ]) +]) # SDL -AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) +AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=yes]) AS_IF([test "$enable_sdl" != "no"], [ PKG_CHECK_MODULES([SDL], [sdl2], [ m4_include([m4/sdl2.m4]) @@ -100,8 +120,8 @@ AS_IF([test "$enable_sdl" != "no"], [ ], [ # not found - AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) - enable_sdl=no + # enable_sdl=no + enable_sdl=yes # have it anyway in submodule ]) ]) @@ -219,6 +239,7 @@ AS_IF([test "$enable_jack" != "no"], [enable_jack=no])])]) +AM_CONDITIONAL([ENABLE_TEST], [test "x$enable_test" = "xyes"]) AM_CONDITIONAL([ENABLE_SDL], [test "x$enable_sdl" = "xyes"]) AM_CONDITIONAL([ENABLE_QT], [test "x$enable_qt" = "xyes"]) AM_CONDITIONAL([ENABLE_JACK], [test "x$enable_jack" = "xyes"]) diff --git a/src/Makefile.am b/src/Makefile.am index 6d5e6e797e..640f7e839b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ if ENABLE_SDL - PROJECTM_SDL_SUBDIR = projectM-test projectM-sdl + PROJECTM_SDL_SUBDIR = projectM-sdl endif if ENABLE_QT @@ -18,6 +18,10 @@ if ENABLE_EMSCRIPTEN PROJECTM_EMSCRIPTEN_SUBDIR = projectM-emscripten endif +if ENABLE_TEST + PROJECTM_TEST_SUBDIR = projectM-test +endif + # system headers/libraries/data to install # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp From 52538531fd74549680869160c6481e0900f185c7 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 21:54:36 +0200 Subject: [PATCH 12/15] wip --- configure.ac | 3 ++- src/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index b06d10aa78..e0d044588b 100644 --- a/configure.ac +++ b/configure.ac @@ -84,7 +84,7 @@ AC_CONFIG_FILES([ ]) AC_ARG_ENABLE([test], -AS_HELP_STRING([--enable-test], [Unit tests]), [], [enable_test=no]) +AS_HELP_STRING([--enable-test], [Build test suite]), [], [enable_test=no]) AS_IF([test "x$enable_test" = "xyes"], [ PKG_CHECK_MODULES([SDL], [sdl2], [ m4_include([m4/sdl2.m4]) @@ -293,4 +293,5 @@ Jack: ${enable_jack} OpenGLES: ${enable_gles} Emscripten: ${enable_emscripten} LLVM JIT: ${enable_llvm} +Test suite: ${enable_test} ]) diff --git a/src/Makefile.am b/src/Makefile.am index 640f7e839b..40a7cdfc6c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,4 +26,4 @@ endif # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp -SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} +SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} ${PROJECTM_TEST_SUBDIR} From e1f49080f3ddc7a3764c0b109f90fd19d5020b32 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 22:14:23 +0200 Subject: [PATCH 13/15] wip --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cde7499987..fb546f0969 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ addons: script: - ./configure $PM_OPTS --prefix=$PWD/local && make -j6 && make install # build from checkout - export PMVER=$(./configure --version | cut -d ' ' -f 3 | grep -m 1 .) # get pM version - - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j6 && make install # build from dist + - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_installi --enable-test && make -j6 && make install # build from dist - echo "PWD=$PWD" - ls . - test -e src/projectM-sdl/projectMSDL @@ -50,7 +50,7 @@ matrix: - libc++-dev - libsdl2-dev env: - - MATRIX_EVAL="PM_OPTS=\"--enable-test --enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" + - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" - os: linux dist: xenial addons: @@ -70,7 +70,7 @@ matrix: - os: osx osx_image: xcode12.2 env: - - MATRIX_EVAL="--enable-test" + - MATRIX_EVAL="PM_OPTS=\"--enable-test\"" notifications: email: From daec6f720a7929eb2a014b2721c6e1dcfb529c64 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 22:26:45 +0200 Subject: [PATCH 14/15] wip --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb546f0969..f3878b49ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ addons: script: - ./configure $PM_OPTS --prefix=$PWD/local && make -j6 && make install # build from checkout - export PMVER=$(./configure --version | cut -d ' ' -f 3 | grep -m 1 .) # get pM version - - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_installi --enable-test && make -j6 && make install # build from dist + - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_install --enable-test && make -j6 && make install # build from dist - echo "PWD=$PWD" - ls . - test -e src/projectM-sdl/projectMSDL @@ -70,7 +70,7 @@ matrix: - os: osx osx_image: xcode12.2 env: - - MATRIX_EVAL="PM_OPTS=\"--enable-test\"" + - MATRIX_EVAL="brew update && brew install sdl2" notifications: email: From b7744ddde67a2841aa2e1c903369388c5c85ede1 Mon Sep 17 00:00:00 2001 From: Mischa Spiegelmock Date: Sat, 13 Feb 2021 22:56:13 +0200 Subject: [PATCH 15/15] Reenable sdl sharedlib (#463) * Get rid of sdl2 submodule. dumb idea. * bleh --- .gitmodules | 4 - .travis.yml | 6 +- BUILDING.md | 5 +- configure.ac | 28 +- src/Makefile.am | 8 +- .../libprojectM.xcodeproj/project.pbxproj | 2 - src/libprojectM/sdltoprojectM.h | 5 +- .../SDLprojectM.xcodeproj/project.pbxproj | 246 +----------------- src/projectM-sdl/pmSDL.hpp | 2 +- 9 files changed, 21 insertions(+), 285 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a633dea40e..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "src/projectM-sdl/sdl2"] - path = src/projectM-sdl/sdl2 - url = https://github.com/libsdl-org/SDL.git - ignore = untracked \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f3878b49ef..ed113dc272 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,13 @@ addons: apt: packages: - libc++-dev - - libgl1-mesa-dev - libsdl2-dev + - libgl1-mesa-dev script: - ./configure $PM_OPTS --prefix=$PWD/local && make -j6 && make install # build from checkout - export PMVER=$(./configure --version | cut -d ' ' -f 3 | grep -m 1 .) # get pM version - - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_install --enable-test && make -j6 && make install # build from dist + - make dist && tar -zxf projectM-${PMVER}.tar.gz && cd projectM-${PMVER} && ./configure $PM_OPTS --prefix=$PWD/dist_install && make -j6 && make install # build from dist - echo "PWD=$PWD" - ls . - test -e src/projectM-sdl/projectMSDL @@ -64,7 +64,7 @@ matrix: - libc++-dev - libsdl2-dev env: - - MATRIX_EVAL="PM_OPTS=\"--enable-test --enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" + - MATRIX_EVAL="PM_OPTS=\"--enable-qt --enable-jack --enable-pulseaudio --enable-sdl\"" # osx/xcode/clang - os: osx diff --git a/BUILDING.md b/BUILDING.md index 35df6e335a..2e0c9d4dd5 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -11,7 +11,7 @@ Main build options & their requirements: | Configure flag | Required dependency | Produced binary | |-----------------------|----------------------------------------------------------------------------------------|-----------------------| -| `--enable-sdl` | (submodule in src/projectm-sdl/sdl2) | `projectMSDL` | +| `--enable-sdl` | `libsdl2-dev` | `projectMSDL` | | `--enable-pulseaudio` | `qt5-default` `qtdeclarative5-dev` `libpulse-dev` `libqt5opengl5-dev` | `projectM-pulseaudio` | | `--enable-jack` | `libjack2-dev`OR`libjack1-dev`; `qt5-default` `qtdeclarative5-dev` `libqt5opengl5-dev` | `projectM-jack` | @@ -20,7 +20,6 @@ Main build options & their requirements: * A modified version of `hlslparser` is included in Renderer and used to transpile HLSL shaders to GLSL * OpenGL 3+ or OpenGLES is required * `libsdl >= 2.0.5` is required for the SDL and emscripten apps. `src/projectM-sdl` is the current reference application implementation. maybe try getting that to build and run as your testbench. -* SDL2 is now provided as a submodule If extra information needed - you can refere to `configure.ac` and the assorted `Makefile.am` files. @@ -35,7 +34,7 @@ sudo make install ### Debian/Ubuntu/Mint ```sh -sudo apt install clang libgl1-mesa-dev qt5-default qtdeclarative5-dev libqt5opengl5-dev libjack-dev libpulse-dev +sudo apt install clang libsdl2-dev libgl1-mesa-dev qt5-default qtdeclarative5-dev libqt5opengl5-dev libjack-dev libpulse-dev ./configure && make -j4 && sudo make install ``` diff --git a/configure.ac b/configure.ac index e0d044588b..e8625e5bf8 100644 --- a/configure.ac +++ b/configure.ac @@ -83,29 +83,9 @@ AC_CONFIG_FILES([ src/projectM-test/Makefile ]) -AC_ARG_ENABLE([test], -AS_HELP_STRING([--enable-test], [Build test suite]), [], [enable_test=no]) -AS_IF([test "x$enable_test" = "xyes"], [ - PKG_CHECK_MODULES([SDL], [sdl2], [ - m4_include([m4/sdl2.m4]) - SDL_VERSION="2.0.5" - AS_IF([test "$TRAVIS"], [SDL_VERSION=2.0.2]) # travis has old SDL, we don't care - AS_IF([test "$EMSCRIPTEN"], [SDL_VERSION=2.0.0]) # emscripten has old SDL, we don't care - - # Check for libSDL >= $SDL_VERSION - AM_PATH_SDL2($SDL_VERSION, - [enable_test=yes], - [AS_IF([test "$enable_test" = "yes"], AC_MSG_ERROR([*** SDL version >= $SDL_VERSION not found!])); enable_sdl=no]) - ], - [ - # not found - AS_IF([test "$enable_test" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) - enable_test=no - ]) -]) # SDL -AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=yes]) +AC_ARG_ENABLE([sdl], AS_HELP_STRING([--enable-sdl], [Build SDL2 application]), [], [enable_sdl=check]) AS_IF([test "$enable_sdl" != "no"], [ PKG_CHECK_MODULES([SDL], [sdl2], [ m4_include([m4/sdl2.m4]) @@ -120,8 +100,8 @@ AS_IF([test "$enable_sdl" != "no"], [ ], [ # not found - # enable_sdl=no - enable_sdl=yes # have it anyway in submodule + AS_IF([test "$enable_sdl" = "yes"], AC_MSG_ERROR([*** libsdl2 not found!])) + enable_sdl=no ]) ]) @@ -239,7 +219,6 @@ AS_IF([test "$enable_jack" != "no"], [enable_jack=no])])]) -AM_CONDITIONAL([ENABLE_TEST], [test "x$enable_test" = "xyes"]) AM_CONDITIONAL([ENABLE_SDL], [test "x$enable_sdl" = "xyes"]) AM_CONDITIONAL([ENABLE_QT], [test "x$enable_qt" = "xyes"]) AM_CONDITIONAL([ENABLE_JACK], [test "x$enable_jack" = "xyes"]) @@ -293,5 +272,4 @@ Jack: ${enable_jack} OpenGLES: ${enable_gles} Emscripten: ${enable_emscripten} LLVM JIT: ${enable_llvm} -Test suite: ${enable_test} ]) diff --git a/src/Makefile.am b/src/Makefile.am index 40a7cdfc6c..6d5e6e797e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ if ENABLE_SDL - PROJECTM_SDL_SUBDIR = projectM-sdl + PROJECTM_SDL_SUBDIR = projectM-test projectM-sdl endif if ENABLE_QT @@ -18,12 +18,8 @@ if ENABLE_EMSCRIPTEN PROJECTM_EMSCRIPTEN_SUBDIR = projectM-emscripten endif -if ENABLE_TEST - PROJECTM_TEST_SUBDIR = projectM-test -endif - # system headers/libraries/data to install # for compatibility reasons here as nobase_include nobase_include_HEADERS = libprojectM/projectM.hpp libprojectM/Common.hpp libprojectM/dlldefs.h libprojectM/event.h libprojectM/fatal.h libprojectM/PCM.hpp -SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} ${PROJECTM_TEST_SUBDIR} +SUBDIRS = libprojectM NativePresets ${PROJECTM_SDL_SUBDIR} ${PROJECTM_QT_SUBDIR} ${PROJECTM_EMSCRIPTEN_SUBDIR} ${PROJECTM_JACK_SUBDIR} ${PROJECTM_PULSEAUDIO_SUBDIR} diff --git a/src/libprojectM/libprojectM.xcodeproj/project.pbxproj b/src/libprojectM/libprojectM.xcodeproj/project.pbxproj index 6d22b88fdb..688b974668 100644 --- a/src/libprojectM/libprojectM.xcodeproj/project.pbxproj +++ b/src/libprojectM/libprojectM.xcodeproj/project.pbxproj @@ -109,7 +109,6 @@ 166854752105E4FD0042793A /* TextureManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 166854242105E4BD0042793A /* TextureManager.cpp */; }; 166854762105E4FD0042793A /* VideoEcho.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1668541D2105E4BC0042793A /* VideoEcho.cpp */; }; 166854772105E4FD0042793A /* Waveform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 166854262105E4BD0042793A /* Waveform.cpp */; }; - 168404F925D82EF30001F02C /* StaticGlShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 168404F425D82ED70001F02C /* StaticGlShaders.cpp */; }; 1687173820C33DF400947E7E /* TextureManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172320C33DF300947E7E /* TextureManager.hpp */; }; 1687173920C33DF400947E7E /* Renderable.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172420C33DF300947E7E /* Renderable.hpp */; }; 1687173B20C33DF400947E7E /* PipelineContext.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1687172620C33DF300947E7E /* PipelineContext.hpp */; }; @@ -777,7 +776,6 @@ 169BC64724CC4D16007B7829 /* FileScanner.cpp in Sources */, 1668544D2105E4FC0042793A /* Pipeline.hpp in Sources */, 1668544E2105E4FC0042793A /* PipelineContext.hpp in Sources */, - 168404F925D82EF30001F02C /* StaticGlShaders.cpp in Sources */, 1668544F2105E4FC0042793A /* Renderable.hpp in Sources */, 166854502105E4FC0042793A /* RenderContext.hpp in Sources */, 166854512105E4FC0042793A /* Renderer.hpp in Sources */, diff --git a/src/libprojectM/sdltoprojectM.h b/src/libprojectM/sdltoprojectM.h index 2a7c12d2d6..ddaa282cd9 100755 --- a/src/libprojectM/sdltoprojectM.h +++ b/src/libprojectM/sdltoprojectM.h @@ -38,8 +38,11 @@ #include "event.h" //#include "projectM/projectM.hpp" +#ifdef WIN32 #include - +#else +#include +#endif inline projectMEvent sdl2pmEvent( SDL_Event *event ) { \ diff --git a/src/projectM-sdl/SDLprojectM.xcodeproj/project.pbxproj b/src/projectM-sdl/SDLprojectM.xcodeproj/project.pbxproj index f530fd77d0..b602fa1a7c 100644 --- a/src/projectM-sdl/SDLprojectM.xcodeproj/project.pbxproj +++ b/src/projectM-sdl/SDLprojectM.xcodeproj/project.pbxproj @@ -13,18 +13,6 @@ 1612C9E3207A85C100862A3A /* libNativePresetFactory.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1612C9E1207A85BD00862A3A /* libNativePresetFactory.a */; }; 16355BFE2143C0F400B3748F /* projectM_SDL_main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C345214E1BF022A5001707D2 /* projectM_SDL_main.cpp */; }; 16355BFF2143C0F600B3748F /* pmSDL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 169501FE1F7009E9008FAF86 /* pmSDL.cpp */; }; - 1684056125D83FFC0001F02C /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684055E25D83FFC0001F02C /* CoreHaptics.framework */; }; - 1684056225D83FFC0001F02C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684055F25D83FFC0001F02C /* CoreAudio.framework */; }; - 1684056325D83FFC0001F02C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684056025D83FFC0001F02C /* CoreGraphics.framework */; }; - 1684056425D840030001F02C /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 168404C625D829370001F02C /* libSDL2.a */; }; - 1684056A25D8402D0001F02C /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684056925D8402D0001F02C /* Carbon.framework */; }; - 1684056B25D840320001F02C /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1648A5DA25D7FA720075B8FC /* Cocoa.framework */; }; - 1684056F25D8403C0001F02C /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684056E25D8403C0001F02C /* CoreVideo.framework */; }; - 1684057125D840420001F02C /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684057025D840420001F02C /* ForceFeedback.framework */; }; - 1684057525D8405D0001F02C /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684057425D8405D0001F02C /* Metal.framework */; }; - 1684057725D840660001F02C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684057625D840660001F02C /* QuartzCore.framework */; }; - 1684057C25D840900001F02C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684057B25D840900001F02C /* AudioToolbox.framework */; }; - 1684059625D84FD10001F02C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1684059525D84FD10001F02C /* IOKit.framework */; }; 168F7156211248E4001806E7 /* SDLprojectM in Executable */ = {isa = PBXBuildFile; fileRef = C34521441BF02294001707D2 /* SDLprojectM */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 168F715921124C0E001806E7 /* config.inp in Support files */ = {isa = PBXBuildFile; fileRef = 16B52AAA21105A6900830F34 /* config.inp */; }; 168F715A21124C14001806E7 /* fonts in Support files */ = {isa = PBXBuildFile; fileRef = C3D30B8F1BF02BE5009AAACD /* fonts */; }; @@ -33,7 +21,6 @@ 169BC64224CC3FCA007B7829 /* presets in Support files */ = {isa = PBXBuildFile; fileRef = C307DFD31D565B57002F6B9E /* presets */; }; 169BC65024CC8401007B7829 /* fonts in Copy Files */ = {isa = PBXBuildFile; fileRef = C3D30B8F1BF02BE5009AAACD /* fonts */; }; C345215C1BF025A9001707D2 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C345215B1BF025A9001707D2 /* OpenGL.framework */; }; - C345215E1BF025CF001707D2 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C345215D1BF025CF001707D2 /* CoreFoundation.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -93,97 +80,6 @@ remoteGlobalIDString = 1612C9AC207A856A00862A3A; remoteInfo = NativePresetFactory; }; - 168404BF25D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BECDF66C0761BA81005FE872; - remoteInfo = Framework; - }; - 168404C125D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7D88B5423E2437C00DCD162; - remoteInfo = "Framework-iOS"; - }; - 168404C325D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7D88D1523E24BED00DCD162; - remoteInfo = "Framework-tvOS"; - }; - 168404C525D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BECDF6B30761BA81005FE872; - remoteInfo = "Static Library"; - }; - 168404C725D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A7D88E5423E24D3B00DCD162; - remoteInfo = "Static Library-iOS"; - }; - 168404C925D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A769B23D23E259AE00872273; - remoteInfo = "Static Library-tvOS"; - }; - 168404CB25D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = DB31407717554B71006C0E22; - remoteInfo = "Shared Library"; - }; - 168404CD25D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A75FCEB323E25AB700529352; - remoteInfo = "Shared Library-iOS"; - }; - 168404CF25D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A75FD06C23E25AC700529352; - remoteInfo = "Shared Library-tvOS"; - }; - 168404D125D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = BECDF6BE0761BA81005FE872; - remoteInfo = "Standard DMG"; - }; - 168404D325D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A75FDB8C23E4C74400529352; - remoteInfo = hidapi; - }; - 168404D525D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A75FDB4923E399AC00529352; - remoteInfo = "hidapi-iOS"; - }; - 168404D725D829370001F02C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 168404AF25D829370001F02C /* SDL.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A75FDB6E23E3A2C900529352; - remoteInfo = "hidapi-tvOS"; - }; 168F714F21120496001806E7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = C345213C1BF02293001707D2 /* Project object */; @@ -235,7 +131,6 @@ /* Begin PBXFileReference section */ 1612C98C207A807000862A3A /* libprojectM.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libprojectM.xcodeproj; path = ../libprojectM/libprojectM.xcodeproj; sourceTree = ""; }; 1648A5DA25D7FA720075B8FC /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 168404AF25D829370001F02C /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = sdl2/Xcode/SDL/SDL.xcodeproj; sourceTree = ""; }; 1684055E25D83FFC0001F02C /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; }; 1684055F25D83FFC0001F02C /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 1684056025D83FFC0001F02C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -273,19 +168,6 @@ buildActionMask = 2147483647; files = ( 1612C997207A80A200862A3A /* libprojectM.a in Frameworks */, - 1684059625D84FD10001F02C /* IOKit.framework in Frameworks */, - 1684057C25D840900001F02C /* AudioToolbox.framework in Frameworks */, - 1684057725D840660001F02C /* QuartzCore.framework in Frameworks */, - 1684057525D8405D0001F02C /* Metal.framework in Frameworks */, - 1684057125D840420001F02C /* ForceFeedback.framework in Frameworks */, - 1684056F25D8403C0001F02C /* CoreVideo.framework in Frameworks */, - 1684056B25D840320001F02C /* Cocoa.framework in Frameworks */, - 1684056A25D8402D0001F02C /* Carbon.framework in Frameworks */, - C345215E1BF025CF001707D2 /* CoreFoundation.framework in Frameworks */, - 1684056425D840030001F02C /* libSDL2.a in Frameworks */, - 1684056125D83FFC0001F02C /* CoreHaptics.framework in Frameworks */, - 1684056225D83FFC0001F02C /* CoreAudio.framework in Frameworks */, - 1684056325D83FFC0001F02C /* CoreGraphics.framework in Frameworks */, 1612C9E2207A85C100862A3A /* libMilkdropPresetFactory.a in Frameworks */, 1612C9E3207A85C100862A3A /* libNativePresetFactory.a in Frameworks */, C345215C1BF025A9001707D2 /* OpenGL.framework in Frameworks */, @@ -328,26 +210,6 @@ name = Products; sourceTree = ""; }; - 168404B025D829370001F02C /* Products */ = { - isa = PBXGroup; - children = ( - 168404C025D829370001F02C /* SDL2.framework */, - 168404C225D829370001F02C /* SDL2.framework */, - 168404C425D829370001F02C /* SDL2.framework */, - 168404C625D829370001F02C /* libSDL2.a */, - 168404C825D829370001F02C /* libSDL2.a */, - 168404CA25D829370001F02C /* libSDL2.a */, - 168404CC25D829370001F02C /* libSDL2.dylib */, - 168404CE25D829370001F02C /* libSDL2.dylib */, - 168404D025D829370001F02C /* libSDL2.dylib */, - 168404D225D829370001F02C /* SDL2 */, - 168404D425D829370001F02C /* hidapi.framework */, - 168404D625D829370001F02C /* hidapi.framework */, - 168404D825D829370001F02C /* hidapi.framework */, - ); - name = Products; - sourceTree = ""; - }; 168F714A21120210001806E7 /* projectM-SDL */ = { isa = PBXGroup; children = ( @@ -371,7 +233,6 @@ C345213B1BF02293001707D2 = { isa = PBXGroup; children = ( - 168404AF25D829370001F02C /* SDL.xcodeproj */, C60BD8E1259CF3CA0038831F /* SDLprojectM.entitlements */, 169501FF1F7009E9008FAF86 /* pmSDL.hpp */, 169501FE1F7009E9008FAF86 /* pmSDL.cpp */, @@ -474,10 +335,6 @@ ProductGroup = 1612C98D207A807000862A3A /* Products */; ProjectRef = 1612C98C207A807000862A3A /* libprojectM.xcodeproj */; }, - { - ProductGroup = 168404B025D829370001F02C /* Products */; - ProjectRef = 168404AF25D829370001F02C /* SDL.xcodeproj */; - }, ); projectRoot = ""; targets = ( @@ -516,97 +373,6 @@ remoteRef = 1612C9E0207A85BD00862A3A /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 168404C025D829370001F02C /* SDL2.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SDL2.framework; - remoteRef = 168404BF25D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404C225D829370001F02C /* SDL2.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SDL2.framework; - remoteRef = 168404C125D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404C425D829370001F02C /* SDL2.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SDL2.framework; - remoteRef = 168404C325D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404C625D829370001F02C /* libSDL2.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libSDL2.a; - remoteRef = 168404C525D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404C825D829370001F02C /* libSDL2.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libSDL2.a; - remoteRef = 168404C725D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404CA25D829370001F02C /* libSDL2.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libSDL2.a; - remoteRef = 168404C925D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404CC25D829370001F02C /* libSDL2.dylib */ = { - isa = PBXReferenceProxy; - fileType = "compiled.mach-o.dylib"; - path = libSDL2.dylib; - remoteRef = 168404CB25D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404CE25D829370001F02C /* libSDL2.dylib */ = { - isa = PBXReferenceProxy; - fileType = "compiled.mach-o.dylib"; - path = libSDL2.dylib; - remoteRef = 168404CD25D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404D025D829370001F02C /* libSDL2.dylib */ = { - isa = PBXReferenceProxy; - fileType = "compiled.mach-o.dylib"; - path = libSDL2.dylib; - remoteRef = 168404CF25D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404D225D829370001F02C /* SDL2 */ = { - isa = PBXReferenceProxy; - fileType = "compiled.mach-o.executable"; - path = SDL2; - remoteRef = 168404D125D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404D425D829370001F02C /* hidapi.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = hidapi.framework; - remoteRef = 168404D325D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404D625D829370001F02C /* hidapi.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = hidapi.framework; - remoteRef = 168404D525D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 168404D825D829370001F02C /* hidapi.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = hidapi.framework; - remoteRef = 168404D725D829370001F02C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -768,11 +534,11 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../libprojectM", "$(SRCROOT)/../../vendor", - "$(SRCROOT)/sdl2/include", + /usr/local/include, "$(SRCROOT)/../../mac", "$(SRCROOT)/../libprojectM/Renderer/hlslparser/src", ); - LIBRARY_SEARCH_PATHS = ""; + LIBRARY_SEARCH_PATHS = /usr/local/lib; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -815,11 +581,11 @@ HEADER_SEARCH_PATHS = ( "$(SRCROOT)/../libprojectM", "$(SRCROOT)/../../vendor", - "$(SRCROOT)/sdl2/include", + /usr/local/include, "$(SRCROOT)/../../mac", "$(SRCROOT)/../libprojectM/Renderer/hlslparser/src", ); - LIBRARY_SEARCH_PATHS = ""; + LIBRARY_SEARCH_PATHS = /usr/local/lib; MACOSX_DEPLOYMENT_TARGET = 10.9; MTL_ENABLE_DEBUG_INFO = NO; OTHER_CFLAGS = "-DDATADIR_PATH='\"/usr/local/share/projectM\"'"; @@ -838,7 +604,7 @@ INFOPLIST_FILE = "$(SRCROOT)/projectM-SDL/Info.plist"; LIBRARY_SEARCH_PATHS = /usr/local/lib; MARKETING_VERSION = 3.1.11; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "-lSDL2"; PRODUCT_BUNDLE_IDENTIFIER = net.projectm.sdl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -858,7 +624,7 @@ INFOPLIST_FILE = "$(SRCROOT)/projectM-SDL/Info.plist"; LIBRARY_SEARCH_PATHS = /usr/local/lib; MARKETING_VERSION = 3.1.11; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = "-lSDL2"; PRODUCT_BUNDLE_IDENTIFIER = net.projectm.sdl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/src/projectM-sdl/pmSDL.hpp b/src/projectM-sdl/pmSDL.hpp index e601b82a70..3df80fdc47 100644 --- a/src/projectM-sdl/pmSDL.hpp +++ b/src/projectM-sdl/pmSDL.hpp @@ -66,7 +66,7 @@ #define SDL_MAIN_HANDLED #include "SDL.h" #else -#include +#include #endif /** WIN32 */ // DATADIR_PATH should be set by the root Makefile if this is being