check if libserial exists for unsupported libserial OS
This commit is contained in:
@@ -60,8 +60,10 @@ extern const device_t ymf289b_ymfm_device;
|
|||||||
extern const device_t ymf278b_ymfm_device;
|
extern const device_t ymf278b_ymfm_device;
|
||||||
|
|
||||||
extern const device_t esfm_esfmu_device;
|
extern const device_t esfm_esfmu_device;
|
||||||
|
#ifdef USE_LIBSERIALPORT
|
||||||
extern const device_t ym_opl2board_device;
|
extern const device_t ym_opl2board_device;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /*SOUND_OPL_H*/
|
#endif /*SOUND_OPL_H*/
|
||||||
|
|||||||
@@ -209,8 +209,10 @@ extern const device_t tndy_device;
|
|||||||
extern const device_t wss_device;
|
extern const device_t wss_device;
|
||||||
extern const device_t ncr_business_audio_device;
|
extern const device_t ncr_business_audio_device;
|
||||||
|
|
||||||
|
#ifdef USE_LIBSERIALPORT
|
||||||
/* External Audio device OPL2Board (Host Connected hardware)*/
|
/* External Audio device OPL2Board (Host Connected hardware)*/
|
||||||
extern const device_t opl2board_device;
|
extern const device_t opl2board_device;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ add_library(snd OBJECT
|
|||||||
snd_ps1.c
|
snd_ps1.c
|
||||||
snd_adlib.c
|
snd_adlib.c
|
||||||
snd_adlibgold.c
|
snd_adlibgold.c
|
||||||
snd_opl2board.c
|
|
||||||
snd_opl_opl2board.cpp
|
|
||||||
snd_ad1848.c
|
snd_ad1848.c
|
||||||
snd_audiopci.c
|
snd_audiopci.c
|
||||||
snd_azt2316a.c
|
snd_azt2316a.c
|
||||||
@@ -173,19 +171,27 @@ if(OPL4ML)
|
|||||||
target_sources(snd PRIVATE midi_opl4.c midi_opl4_yrw801.c)
|
target_sources(snd PRIVATE midi_opl4.c midi_opl4_yrw801.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig )
|
||||||
pkg_check_modules(SERIALPORT REQUIRED libserialport)
|
pkg_check_modules(SERIALPORT libserialport)
|
||||||
if(APPLE)
|
|
||||||
include_directories(${LIBSERIALPORT_ROOT}/include)
|
|
||||||
target_link_libraries(86Box ${LIBSERIALPORT_ROOT}/lib/libserialport.dylib)
|
|
||||||
elseif(WIN32)
|
|
||||||
include_directories(${SERIALPORT_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(86Box ${SERIALPORT_LIBRARIES} SetupAPI)
|
|
||||||
else()
|
|
||||||
include_directories(${SERIALPORT_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(86Box ${SERIALPORT_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
if(SERIALPORT_FOUND OR DEFINED LIBSERIALPORT_ROOT)
|
||||||
|
add_compile_definitions(USE_LIBSERIALPORT=1)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
include_directories(${LIBSERIALPORT_ROOT}/include)
|
||||||
|
target_link_libraries(86Box ${LIBSERIALPORT_ROOT}/lib/libserialport.dylib)
|
||||||
|
elseif(WIN32)
|
||||||
|
include_directories(${SERIALPORT_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(86Box ${SERIALPORT_LIBRARIES} SetupAPI)
|
||||||
|
else()
|
||||||
|
include_directories(${SERIALPORT_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(86Box ${SERIALPORT_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
target_sources(snd PRIVATE
|
||||||
|
snd_opl2board.c
|
||||||
|
snd_opl_opl2board.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(resid-fp)
|
add_subdirectory(resid-fp)
|
||||||
target_link_libraries(86Box resid-fp)
|
target_link_libraries(86Box resid-fp)
|
||||||
|
|||||||
@@ -58,11 +58,12 @@ fm_driver_get(int chip_id, fm_drv_t *drv)
|
|||||||
drv->priv = device_add_inst(&ymf262_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
drv->priv = device_add_inst(&ymf262_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#ifdef USE_LIBSERIALPORT
|
||||||
case FM_OPL2BOARD:
|
case FM_OPL2BOARD:
|
||||||
*drv = ymfm_opl2board_drv;
|
*drv = ymfm_opl2board_drv;
|
||||||
drv->priv = device_add_inst(&ym_opl2board_device, fm_dev_inst[fm_driver][chip_id]++);
|
drv->priv = device_add_inst(&ym_opl2board_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case FM_YMF289B:
|
case FM_YMF289B:
|
||||||
*drv = ymfm_drv;
|
*drv = ymfm_drv;
|
||||||
drv->priv = device_add_inst(&ymf289b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
drv->priv = device_add_inst(&ymf289b_ymfm_device, fm_dev_inst[fm_driver][chip_id]++);
|
||||||
|
|||||||
@@ -153,7 +153,9 @@ static const SOUND_CARD sound_cards[] = {
|
|||||||
{ &ct5880_device },
|
{ &ct5880_device },
|
||||||
{ &ad1881_device },
|
{ &ad1881_device },
|
||||||
{ &cs4297a_device },
|
{ &cs4297a_device },
|
||||||
|
#ifdef USE_LIBSERIALPORT /*The following devices required LIBSERIALPORT*/
|
||||||
{ &opl2board_device },
|
{ &opl2board_device },
|
||||||
|
#endif
|
||||||
{ NULL }
|
{ NULL }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user