mirror of
https://github.com/ZDoom/ZMusic.git
synced 2024-11-15 00:41:36 +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.
28 lines
552 B
CMake
28 lines
552 B
CMake
make_release_only()
|
|
|
|
add_library(adl OBJECT)
|
|
|
|
target_sources(adl
|
|
PRIVATE
|
|
adlmidi_midiplay.cpp
|
|
adlmidi_opl3.cpp
|
|
adlmidi_private.cpp
|
|
adlmidi.cpp
|
|
adlmidi_load.cpp
|
|
inst_db.cpp
|
|
chips/opal_opl3.cpp
|
|
chips/dosbox/dbopl.cpp
|
|
chips/nuked_opl3_v174.cpp
|
|
chips/java_opl3.cpp
|
|
chips/dosbox_opl3.cpp
|
|
chips/nuked_opl3.cpp
|
|
chips/nuked/nukedopl3_174.c
|
|
chips/nuked/nukedopl3.c
|
|
wopl/wopl_file.c
|
|
)
|
|
|
|
target_compile_definitions(adl PRIVATE ADLMIDI_DISABLE_MIDI_SEQUENCER)
|
|
|
|
target_include_directories(adl PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
use_fast_math(adl)
|