2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
# running old operating systems and software designed for IBM
|
|
|
|
|
# PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
# system designs based on the PCI bus.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# This file is part of the 86Box distribution.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# CMake build script.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
2021-12-20 15:03:42 +01:00
|
|
|
# Copyright 2020,2021 David Hrdlička.
|
2021-01-12 18:05:25 +01:00
|
|
|
#
|
|
|
|
|
|
2022-01-29 20:25:00 -05:00
|
|
|
add_library(snd OBJECT sound.c snd_opl.c snd_opl_nuked.c snd_resid.cc
|
2021-12-20 15:03:42 +01:00
|
|
|
midi.c midi_rtmidi.cpp snd_speaker.c snd_pssj.c snd_lpt_dac.c snd_ac97_codec.c snd_ac97_via.c
|
2022-01-08 20:15:56 -05:00
|
|
|
snd_lpt_dss.c snd_ps1.c snd_adlib.c snd_adlibgold.c snd_ad1848.c snd_audiopci.c
|
2021-12-20 15:03:42 +01:00
|
|
|
snd_azt2316a.c snd_cms.c snd_cs423x.c snd_gus.c snd_sb.c snd_sb_dsp.c
|
|
|
|
|
snd_emu8k.c snd_mpu401.c snd_sn76489.c snd_ssi2001.c snd_wss.c snd_ym7128.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
|
2022-01-29 20:25:00 -05:00
|
|
|
if(OPENAL)
|
|
|
|
|
target_compile_definitions(snd PRIVATE USE_OPENAL)
|
|
|
|
|
target_sources(snd PRIVATE openal.c)
|
|
|
|
|
endif()
|
|
|
|
|
|
2021-01-12 18:22:40 +01:00
|
|
|
if(FLUIDSYNTH)
|
2021-12-20 15:03:42 +01:00
|
|
|
target_compile_definitions(snd PRIVATE USE_FLUIDSYNTH)
|
|
|
|
|
target_sources(snd PRIVATE midi_fluidsynth.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(MUNT)
|
2021-12-20 15:03:42 +01:00
|
|
|
target_compile_definitions(snd PRIVATE USE_MUNT)
|
|
|
|
|
target_sources(snd PRIVATE midi_mt32.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
|
2022-01-13 03:01:15 +01:00
|
|
|
option(MUNT_EXTERNAL "Link against the system-provided MUNT library" OFF)
|
|
|
|
|
mark_as_advanced(MUNT_EXTERNAL)
|
|
|
|
|
|
|
|
|
|
if(MUNT_EXTERNAL)
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
|
pkg_check_modules(MT32EMU REQUIRED IMPORTED_TARGET mt32emu)
|
|
|
|
|
target_link_libraries(86Box PkgConfig::MT32EMU)
|
|
|
|
|
else()
|
|
|
|
|
add_subdirectory(munt)
|
|
|
|
|
target_link_libraries(86Box mt32emu)
|
|
|
|
|
endif()
|
2021-01-12 18:22:40 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(PAS16)
|
2021-12-20 15:03:42 +01:00
|
|
|
target_compile_definitions(snd PRIVATE USE_PAS16)
|
|
|
|
|
target_sources(snd PRIVATE snd_pas16.c)
|
2021-01-12 18:22:40 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(GUSMAX)
|
2021-12-20 15:03:42 +01:00
|
|
|
target_compile_definitions(snd PRIVATE USE_GUSMAX)
|
2021-01-12 18:22:40 +01:00
|
|
|
endif()
|
|
|
|
|
|
2022-02-14 05:10:50 +05:00
|
|
|
if(TANDY_ISA)
|
|
|
|
|
target_compile_definitions(snd PRIVATE USE_TANDY_ISA)
|
|
|
|
|
endif()
|
|
|
|
|
|
2021-01-12 18:22:40 +01:00
|
|
|
add_subdirectory(resid-fp)
|
|
|
|
|
target_link_libraries(86Box resid-fp)
|