From 55b6629ec3e0c51a9c70d20847ecef74185dcd4c Mon Sep 17 00:00:00 2001 From: Memotech Bill <64212746+Memotech-Bill@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:17:42 +0100 Subject: [PATCH] Fix accidental deletion fom CMakeLists.txt --- src/memu/CMakeLists.txt | 91 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/src/memu/CMakeLists.txt b/src/memu/CMakeLists.txt index 2b5d9df..2a3403d 100644 --- a/src/memu/CMakeLists.txt +++ b/src/memu/CMakeLists.txt @@ -45,6 +45,85 @@ if("${TARGET}" STREQUAL "Pico") ${CMAKE_CURRENT_LIST_DIR}/win_pico.c ) +elseif("${TARGET}" STREQUAL "XWin") + + set (sdl_src + ${CMAKE_CURRENT_LIST_DIR}/cfx2.c + ${CMAKE_CURRENT_LIST_DIR}/common.c + ${CMAKE_CURRENT_LIST_DIR}/config.c + ${CMAKE_CURRENT_LIST_DIR}/cpm.c + ${CMAKE_CURRENT_LIST_DIR}/ctc.c + ${CMAKE_CURRENT_LIST_DIR}/dart.c + ${CMAKE_CURRENT_LIST_DIR}/diag.c + ${CMAKE_CURRENT_LIST_DIR}/dirmap.c + ${CMAKE_CURRENT_LIST_DIR}/dirt_unix.c + ${CMAKE_CURRENT_LIST_DIR}/dis.c + ${CMAKE_CURRENT_LIST_DIR}/joy_lin.c + ${CMAKE_CURRENT_LIST_DIR}/kbd2.c + ${CMAKE_CURRENT_LIST_DIR}/main.c + ${CMAKE_CURRENT_LIST_DIR}/mem.c + ${CMAKE_CURRENT_LIST_DIR}/memu.c + ${CMAKE_CURRENT_LIST_DIR}/mfx.c + ${CMAKE_CURRENT_LIST_DIR}/mon.c + ${CMAKE_CURRENT_LIST_DIR}/monprom.c + ${CMAKE_CURRENT_LIST_DIR}/nfx.c + ${CMAKE_CURRENT_LIST_DIR}/printer.c + ${CMAKE_CURRENT_LIST_DIR}/rom_os.c + ${CMAKE_CURRENT_LIST_DIR}/rom_assem.c + ${CMAKE_CURRENT_LIST_DIR}/rom_basic.c + ${CMAKE_CURRENT_LIST_DIR}/rom_boot_type07.c + ${CMAKE_CURRENT_LIST_DIR}/rom_sdx_type07.c + ${CMAKE_CURRENT_LIST_DIR}/sdcard.c + ${CMAKE_CURRENT_LIST_DIR}/sdxfdc.c + ${CMAKE_CURRENT_LIST_DIR}/sid.c + ${CMAKE_CURRENT_LIST_DIR}/snd.c + ${CMAKE_CURRENT_LIST_DIR}/spec.c + ${CMAKE_CURRENT_LIST_DIR}/tape.c + ${CMAKE_CURRENT_LIST_DIR}/txtwin.c + ${CMAKE_CURRENT_LIST_DIR}/ui.c + ${CMAKE_CURRENT_LIST_DIR}/vdeb.c + ${CMAKE_CURRENT_LIST_DIR}/vdp.c + ${CMAKE_CURRENT_LIST_DIR}/vga.c + ${CMAKE_CURRENT_LIST_DIR}/vid.c + ${CMAKE_CURRENT_LIST_DIR}/win.c + ${CMAKE_CURRENT_LIST_DIR}/win_x.c + ) + + if( NOT (${CMAKE_VERSION} VERSION_LESS "3.12.0")) + + add_library(memu_src INTERFACE) + + target_include_directories(memu_src INTERFACE + ${CMAKE_CURRENT_LIST_DIR} + ${SDL2_INCLUDE_DIRS} + ) + + target_sources(memu_src INTERFACE ${sdl_src}) + + else() + cmake_minimum_required(VERSION 3.5) + + project(memu C) + + add_executable(memu-x ${sdl_src}) + + target_include_directories(memu-x PUBLIC + ${CMAKE_CURRENT_LIST_DIR} + ) + + target_compile_definitions(memu-x PUBLIC ${src_defs}) + + target_compile_options(memu-x PRIVATE -g) + target_link_options(memu-x PRIVATE -g) + + target_link_libraries(memu-x PUBLIC + Z80_emu + portaudio + m + ) + + endif () + elseif("${TARGET}" STREQUAL "FBuf") set (fbuf_src @@ -338,19 +417,19 @@ elseif("${TARGET}" STREQUAL "SDL") project(memu C) - add_executable(memu-x ${sdl_src}) + add_executable(memu-sdl ${sdl_src}) - target_include_directories(memu-x PUBLIC + target_include_directories(memu-sdl PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${SDL2_INCLUDE_DIRS} ) - target_compile_definitions(memu-x PUBLIC ${src_defs}) + target_compile_definitions(memu-sdl PUBLIC ${src_defs}) - target_compile_options(memu-x PRIVATE -g) - target_link_options(memu-x PRIVATE -g) + target_compile_options(memu-sdl PRIVATE -g) + target_link_options(memu-sdl PRIVATE -g) - target_link_libraries(memu-x PUBLIC + target_link_libraries(memu-sdl PUBLIC Z80_emu portaudio ${SDL2_LIBRARIES}