Files
86Box/src/win/CMakeLists.txt
2021-01-12 18:26:18 +01:00

48 lines
1.5 KiB
CMake

#
# 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.
#
# This file is part of the 86Box distribution.
#
# CMake build script.
#
# Authors: David Hrdlička, <hrdlickadavid@outlook.com>
#
# Copyright 2020,2021 David Hrdlička.
#
enable_language(RC)
add_library(plat OBJECT win.c win_dynld.c win_thread.c win_cdrom.c
win_keyboard.c win_crashdump.c win_midi.c win_mouse.c)
add_library(ui OBJECT win_ui.c win_stbar.c win_sdl.c win_dialog.c win_about.c
win_settings.c win_devconf.c win_snd_gain.c win_new_floppy.c
win_jsconf.c win_media_menu.c 86Box.rc)
if(MSVC)
# MSVC complains when we include the manifest from 86Box.rc...
# On the bright side, CMake supports passing the manifest as a source
# file when using MSVC, so we might just as well do that!
target_compile_definitions(ui PRIVATE NO_INCLUDE_MANIFEST)
target_sources(86Box PRIVATE 86Box.manifest)
endif()
if(DINPUT)
target_sources(plat PRIVATE win_joystick.cpp)
target_link_libraries(86Box dinput8)
else()
target_sources(plat PRIVATE win_joystick_rawinput.c)
endif()
if(DISCORD)
# PUBLIC due to config.c and pc.c
target_compile_definitions(ui PUBLIC USE_DISCORD)
target_sources(ui PRIVATE win_discord.c)
endif()
target_link_libraries(86Box advapi32 comctl32 comdlg32 gdi32 shell32 iphlpapi
dxguid imm32 hid setupapi uxtheme version winmm psapi)