mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-12-03 17:12:08 +00:00
b3c4b55dab
- Prefer target properties instead of setting variables whenever possible. A zmusic-obj target now exists to represent the commonality between zmusic and zmusiclite. - Factored out as much as possible from global settings to per target settings which will make it easier to support using ZMusic as a submodule. Moved helper functions into a ZUtility.cmake module. - We now generate and install ZMusicConfig.cmake so find_package(ZMusic) will work either automatically or given ZMusic_DIR is set. - CPack is enabled although some refinement is still needed. - Requires CMake >= 3.13 which is newer than I would normally like, but given how no one like to refactor these things it may be better to deal with the short term pain of going a little aggressive on the requirement in order to avoid having to make things ugly. Especially given that these scripts have a tendency to be copy/pasted into sister projects. CMake itself has very few dependencies so users of old Linux distros should be able to easily compile a supported version of CMake. - On Windows CMake >= 3.15 is required for redistributable results. - Cleaned out bits that were copied from GZDoom but not relevant to ZMusic.
48 lines
1 KiB
CMake
48 lines
1 KiB
CMake
make_release_only()
|
|
|
|
add_library(opn OBJECT)
|
|
|
|
target_sources(opn
|
|
PRIVATE
|
|
opnmidi_load.cpp
|
|
opnmidi_private.cpp
|
|
opnmidi.cpp
|
|
opnmidi_midiplay.cpp
|
|
opnmidi_opn2.cpp
|
|
chips/np2/fmgen_fmgen.cpp
|
|
chips/np2/fmgen_opna.cpp
|
|
chips/np2/fmgen_fmtimer.cpp
|
|
chips/np2/fmgen_file.cpp
|
|
chips/np2/fmgen_psg.cpp
|
|
chips/mame_opn2.cpp
|
|
chips/gens_opn2.cpp
|
|
chips/mame_opna.cpp
|
|
chips/np2_opna.cpp
|
|
chips/mamefm/ymdeltat.cpp
|
|
chips/mamefm/resampler.cpp
|
|
chips/mamefm/fm.cpp
|
|
chips/nuked_opn2.cpp
|
|
chips/gens/Ym2612_Emu.cpp
|
|
chips/gx_opn2.cpp
|
|
chips/pmdwin_opna.cpp
|
|
chips/nuked/ym3438.c
|
|
chips/gx/gx_ym2612.c
|
|
chips/pmdwin/opna.c
|
|
chips/pmdwin/psg.c
|
|
chips/pmdwin/rhythmdata.c
|
|
chips/mamefm/emu2149.c
|
|
chips/mame/mame_ym2612fm.c
|
|
wopn/wopn_file.c
|
|
)
|
|
|
|
target_compile_definitions(opn
|
|
PRIVATE
|
|
# we play with out own sequencer
|
|
OPNMIDI_DISABLE_MIDI_SEQUENCER
|
|
# Disable OPNMIDI's experimental yet emulator (using of it has some issues and missing notes in playback)
|
|
OPNMIDI_DISABLE_GX_EMULATOR
|
|
)
|
|
|
|
target_include_directories(opn PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
use_fast_math(opn)
|