Oops I forgot to log in when I made this post so I can't edit it. But I have an update now.
I tried doing this
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DNO_FMOD=ON \
-DNO_OPENAL=ON \
-DNO_ZMUSIC=ON \
-DDYN_ZMUSIC=OFF \
-DZMUSIC_INCLUDE_DIR=/gzdoom/dummy_includes \
-DZMUSIC_LIBRARIES=/dev/null \
-DNO_VPX=ON \
-DDYN_VPX=OFF \
-DVPX_INCLUDE_DIR=/gzdoom/dummy_includes \
-DVPX_LIBRARIES=/dev/null \
..
And created a dummy include file
// Dummy zmusic.h
#ifndef ZMUSIC_DUMMY_H
#define ZMUSIC_DUMMY_H
// Dummy definition of ZMusic_MusicStream
typedef void* ZMusic_MusicStream;
// Dummy function stubs
inline void ZMusic_Close(ZMusic_MusicStream) {}
inline void ZMusic_Play(ZMusic_MusicStream, bool, float) {}
inline void ZMusic_Pause(ZMusic_MusicStream) {}
inline void ZMusic_Resume(ZMusic_MusicStream) {}
inline void ZMusic_Stop(ZMusic_MusicStream) {}
inline bool ZMusic_IsPlaying(ZMusic_MusicStream) { return false; }
// Missing MIDI device constants (add these)
#define MDEV_TIMIDITY 0
#define MDEV_SNDSYS 0
#define MDEV_STANDARD 0
#define MDEV_OPL 0
#define MDEV_DEFAULT 0
#define MDEV_FLUIDSYNTH 0
#define MDEV_GUS 0
#define MDEV_WILDMIDI 0
#define MDEV_ADL 0
#define MDEV_OPN 0
// Dummy MIDI device struct (used internally by GZDoom)
struct MidiDeviceSetting
{
int device;
// Add dummy members if needed
};
#endif // ZMUSIC_DUMMY_H
Because no matter what flags I used it was still trying to include zmusic.h
Now I'm trying this
cd /gzdoom/build
rm -rf *
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DNO_FMOD=ON \
-DNO_OPENAL=ON \
-DNO_ZMUSIC=ON \
-DDYN_ZMUSIC=OFF \
-DZMUSIC_INCLUDE_DIR=/gzdoom/dummy_includes \
-DZMUSIC_LIBRARIES=/dev/null \
-DNO_VPX=ON \
-DDYN_VPX=OFF \
-DVPX_INCLUDE_DIR=/gzdoom/dummy_includes \
-DVPX_LIBRARIES=/dev/null \
..
make clean
make -j4
And I'm stuck on this error so far
/gzdoom/src/common/audio/music/s_music.h:68:8: error: redefinition of 'struct MidiDeviceSetting'
68 | struct MidiDeviceSetting
| ^~~~~~~~~~~~~~~~~
In file included from /gzdoom/src/common/audio/sound/i_sound.h:42,
from /gzdoom/src/common/audio/sound/s_soundinternal.h:3,
from /gzdoom/src/sound/s_sound.h:38,
from /gzdoom/src/console/c_cmds.cpp:48:
/gzdoom/dummy_includes/zmusic.h:29:8: note: previous definition of 'struct MidiDeviceSetting'
29 | struct MidiDeviceSetting
| ^~~~~~~~~~~~~~~~~
/gzdoom/src/console/c_cmds.cpp: In function 'void Cmd_mapinfo(FCommandLine&, int)':
/gzdoom/src/console/c_cmds.cpp

9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1325 | if (myLevel->Music.IsNotEmpty())
| ^~
/gzdoom/src/console/c_cmds.cpp

17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1328 | Printf(" PixelStretch: %f\n", myLevel->pixelstretch);
| ^~~~~~
/gzdoom/src/console/c_cmds.cpp

9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1339 | if (myLevel->RedirectCVARMapName.IsNotEmpty())
| ^~
/gzdoom/src/console/c_cmds.cpp

17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1342 | Printf(" LightMode: %i\n", (int8_t)myLevel->lightmode);
| ^~~~~~
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make

src/CMakeFiles/zdoom.dir/console/c_cmds.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:830: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
So it seems like I'm rolling the ball uphill right now.
Has anyone had any luck building and compiling GZDoom without music and sound with just the flags alone?
Oops I forgot to log in when I made this post so I can't edit it. But I have an update now.
I tried doing this
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DNO_FMOD=ON \
-DNO_OPENAL=ON \
-DNO_ZMUSIC=ON \
-DDYN_ZMUSIC=OFF \
-DZMUSIC_INCLUDE_DIR=/gzdoom/dummy_includes \
-DZMUSIC_LIBRARIES=/dev/null \
-DNO_VPX=ON \
-DDYN_VPX=OFF \
-DVPX_INCLUDE_DIR=/gzdoom/dummy_includes \
-DVPX_LIBRARIES=/dev/null \
..
And created a dummy include file
// Dummy zmusic.h
#ifndef ZMUSIC_DUMMY_H
#define ZMUSIC_DUMMY_H
// Dummy definition of ZMusic_MusicStream
typedef void* ZMusic_MusicStream;
// Dummy function stubs
inline void ZMusic_Close(ZMusic_MusicStream) {}
inline void ZMusic_Play(ZMusic_MusicStream, bool, float) {}
inline void ZMusic_Pause(ZMusic_MusicStream) {}
inline void ZMusic_Resume(ZMusic_MusicStream) {}
inline void ZMusic_Stop(ZMusic_MusicStream) {}
inline bool ZMusic_IsPlaying(ZMusic_MusicStream) { return false; }
// Missing MIDI device constants (add these)
#define MDEV_TIMIDITY 0
#define MDEV_SNDSYS 0
#define MDEV_STANDARD 0
#define MDEV_OPL 0
#define MDEV_DEFAULT 0
#define MDEV_FLUIDSYNTH 0
#define MDEV_GUS 0
#define MDEV_WILDMIDI 0
#define MDEV_ADL 0
#define MDEV_OPN 0
// Dummy MIDI device struct (used internally by GZDoom)
struct MidiDeviceSetting
{
int device;
// Add dummy members if needed
};
#endif // ZMUSIC_DUMMY_H
Because no matter what flags I used it was still trying to include zmusic.h
Now I'm trying this
cd /gzdoom/build
rm -rf *
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DNO_FMOD=ON \
-DNO_OPENAL=ON \
-DNO_ZMUSIC=ON \
-DDYN_ZMUSIC=OFF \
-DZMUSIC_INCLUDE_DIR=/gzdoom/dummy_includes \
-DZMUSIC_LIBRARIES=/dev/null \
-DNO_VPX=ON \
-DDYN_VPX=OFF \
-DVPX_INCLUDE_DIR=/gzdoom/dummy_includes \
-DVPX_LIBRARIES=/dev/null \
..
make clean
make -j4
And I'm stuck on this error so far
/gzdoom/src/common/audio/music/s_music.h:68:8: error: redefinition of 'struct MidiDeviceSetting'
68 | struct MidiDeviceSetting
| ^~~~~~~~~~~~~~~~~
In file included from /gzdoom/src/common/audio/sound/i_sound.h:42,
from /gzdoom/src/common/audio/sound/s_soundinternal.h:3,
from /gzdoom/src/sound/s_sound.h:38,
from /gzdoom/src/console/c_cmds.cpp:48:
/gzdoom/dummy_includes/zmusic.h:29:8: note: previous definition of 'struct MidiDeviceSetting'
29 | struct MidiDeviceSetting
| ^~~~~~~~~~~~~~~~~
/gzdoom/src/console/c_cmds.cpp: In function 'void Cmd_mapinfo(FCommandLine&, int)':
/gzdoom/src/console/c_cmds.cpp:1325:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1325 | if (myLevel->Music.IsNotEmpty())
| ^~
/gzdoom/src/console/c_cmds.cpp:1328:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1328 | Printf(" PixelStretch: %f\n", myLevel->pixelstretch);
| ^~~~~~
/gzdoom/src/console/c_cmds.cpp:1339:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
1339 | if (myLevel->RedirectCVARMapName.IsNotEmpty())
| ^~
/gzdoom/src/console/c_cmds.cpp:1342:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
1342 | Printf(" LightMode: %i\n", (int8_t)myLevel->lightmode);
| ^~~~~~
make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:1264: src/CMakeFiles/zdoom.dir/console/c_cmds.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:830: src/CMakeFiles/zdoom.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
So it seems like I'm rolling the ball uphill right now.
Has anyone had any luck building and compiling GZDoom without music and sound with just the flags alone?