2024-02-21 13:32:24 +00:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2019-07-07 06:10:32 +00:00
|
|
|
project(dingusppc)
|
2019-12-16 15:31:33 +00:00
|
|
|
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
include(PlatformGlob)
|
|
|
|
|
2023-06-20 05:36:09 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2019-12-14 19:56:43 +00:00
|
|
|
|
2019-07-07 06:10:32 +00:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2020-05-09 12:29:37 +00:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
2020-02-28 04:03:01 +00:00
|
|
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
|
2020-05-08 20:32:29 +00:00
|
|
|
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
if (NOT WIN32 AND NOT EMSCRIPTEN)
|
2023-01-08 21:27:13 +00:00
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
include_directories(${SDL2_INCLUDE_DIRS})
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
find_package (Threads)
|
|
|
|
endif()
|
|
|
|
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
elseif (WIN32) # Windows build relies on vcpkg
|
2023-01-08 21:27:13 +00:00
|
|
|
# pick up system wide vcpkg if exists
|
|
|
|
if (DEFINED ENV{VCPKG_ROOT} AND EXISTS $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
|
|
|
message(STATUS "Using system vcpkg at $ENV{VCPKG_ROOT}")
|
|
|
|
set(vcpkg_toolchain_file $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
|
|
|
|
|
|
|
# check Github Actions vcpkg installation
|
2023-03-19 14:55:26 +00:00
|
|
|
elseif (DEFINED ENV{VCPKG_INSTALLATION_ROOT} AND EXISTS $ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
2023-01-08 21:27:13 +00:00
|
|
|
message(STATUS "Using system vcpkg at $ENV{VCPKG_INSTALLATION_ROOT}")
|
|
|
|
set(vcpkg_toolchain_file $ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
|
|
|
|
|
|
|
# otherwise, fetch vcpkg from Github
|
|
|
|
else()
|
|
|
|
message(STATUS "Fetching latest vcpkg from Github...")
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(vcpkg GIT_REPOSITORY https://github.com/microsoft/vcpkg.git)
|
|
|
|
FetchContent_MakeAvailable(vcpkg)
|
|
|
|
set(vcpkg_toolchain_file ${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_TOOLCHAIN_FILE ${vcpkg_toolchain_file})
|
|
|
|
find_package(SDL2 CONFIG REQUIRED)
|
|
|
|
add_compile_definitions(SDL_MAIN_HANDLED)
|
2020-03-23 03:15:12 +00:00
|
|
|
endif()
|
2020-03-19 14:09:24 +00:00
|
|
|
|
2023-08-31 06:12:43 +00:00
|
|
|
if (EMSCRIPTEN)
|
|
|
|
message(STATUS "Targeting Emscripten")
|
|
|
|
# loguru tries to include excinfo.h, which is not available under Emscripten.
|
|
|
|
add_compile_definitions(LOGURU_STACKTRACES=0)
|
|
|
|
endif()
|
|
|
|
|
2021-01-24 10:45:12 +00:00
|
|
|
option(DPPC_BUILD_PPC_TESTS "Build PowerPC tests" OFF)
|
2021-01-08 19:38:40 +00:00
|
|
|
option(DPPC_BUILD_BENCHMARKS "Build benchmarking programs" OFF)
|
|
|
|
|
2021-10-23 19:51:16 +00:00
|
|
|
option(DPPC_68K_DEBUGGER "Enable 68k debugging" OFF)
|
2020-12-03 01:18:13 +00:00
|
|
|
|
2021-10-23 19:51:16 +00:00
|
|
|
if (DPPC_68K_DEBUGGER)
|
2020-12-03 01:18:13 +00:00
|
|
|
# Turn off anything unnecessary.
|
|
|
|
set(CAPSTONE_BUILD_SHARED OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_BUILD_TESTS OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_BUILD_CSTOOL OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_BUILD_DIET OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_OSXKERNEL_SUPPORT OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
# Disable unused Capstone architectures.
|
|
|
|
set(CAPSTONE_ARM_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_ARM64_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_MIPS_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_PPC_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_SPARC_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_SYSZ_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_XCORE_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_X86_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_TMS320C64X_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_M680X_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_EVM_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_MOS65XX_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_WASM_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_BPF_SUPPORT OFF CACHE BOOL "")
|
|
|
|
set(CAPSTONE_RISCV_SUPPORT OFF CACHE BOOL "")
|
|
|
|
|
|
|
|
ADD_DEFINITIONS(-DENABLE_68K_DEBUGGER)
|
|
|
|
|
|
|
|
add_subdirectory(thirdparty/capstone EXCLUDE_FROM_ALL)
|
|
|
|
endif()
|
2020-07-13 21:39:31 +00:00
|
|
|
|
2022-01-10 15:36:14 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/core")
|
2020-02-03 13:36:30 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/cpu/ppc/")
|
2020-04-20 18:32:09 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/debugger/")
|
2020-02-03 13:36:30 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/devices/")
|
2020-03-13 21:49:58 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/machines/")
|
2021-04-13 23:27:07 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/utils/")
|
2020-03-23 03:15:12 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/thirdparty/loguru/")
|
2020-02-03 13:36:30 +00:00
|
|
|
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
if (NOT EMSCRIPTEN)
|
|
|
|
set(BUILD_TESTS OFF CACHE BOOL "Build Cubeb tests")
|
|
|
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
|
|
|
|
set(BUILD_TOOLS OFF CACHE BOOL "Build Cubeb tools")
|
|
|
|
add_subdirectory(thirdparty/cubeb EXCLUDE_FROM_ALL)
|
|
|
|
endif()
|
2020-05-08 20:32:29 +00:00
|
|
|
|
2020-09-20 21:25:29 +00:00
|
|
|
set(CLI11_ROOT ${PROJECT_SOURCE_DIR}/thirdparty/CLI11)
|
|
|
|
|
2021-10-23 18:17:47 +00:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}"
|
2022-01-10 15:36:14 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/core"
|
2021-10-23 18:17:47 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/devices"
|
2020-02-03 13:36:30 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc"
|
2020-02-28 04:03:01 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/debugger"
|
2021-04-13 23:27:07 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/utils"
|
2020-03-23 03:15:12 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/loguru/"
|
2021-09-17 11:27:49 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/CLI11/"
|
2023-01-08 21:27:13 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/thirdparty/cubeb/include")
|
2020-02-03 13:36:30 +00:00
|
|
|
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
platform_glob(SOURCES "${PROJECT_SOURCE_DIR}/*.cpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/*.c"
|
|
|
|
"${PROJECT_SOURCE_DIR}/*.hpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/*.h")
|
2019-12-16 15:31:33 +00:00
|
|
|
|
2023-10-29 19:12:46 +00:00
|
|
|
if (APPLE)
|
|
|
|
platform_glob(APPLE_SOURCES "${PROJECT_SOURCE_DIR}/*.m")
|
|
|
|
list(APPEND SOURCES ${APPLE_SOURCES})
|
|
|
|
endif()
|
|
|
|
|
2020-02-03 13:36:30 +00:00
|
|
|
file(GLOB TEST_SOURCES "${PROJECT_SOURCE_DIR}/cpu/ppc/test/*.cpp")
|
2019-12-16 15:31:33 +00:00
|
|
|
|
2022-01-10 15:36:14 +00:00
|
|
|
add_executable(dingusppc ${SOURCES} $<TARGET_OBJECTS:core>
|
2020-04-20 18:32:09 +00:00
|
|
|
$<TARGET_OBJECTS:cpu_ppc>
|
2022-01-10 15:36:14 +00:00
|
|
|
$<TARGET_OBJECTS:debugger>
|
2020-03-13 21:49:58 +00:00
|
|
|
$<TARGET_OBJECTS:devices>
|
|
|
|
$<TARGET_OBJECTS:machines>
|
2021-04-13 23:27:07 +00:00
|
|
|
$<TARGET_OBJECTS:utils>
|
2020-02-28 04:03:01 +00:00
|
|
|
$<TARGET_OBJECTS:loguru>)
|
2020-05-08 20:32:29 +00:00
|
|
|
|
2020-03-23 03:15:12 +00:00
|
|
|
if (WIN32)
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(dingusppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb)
|
2023-08-31 06:12:43 +00:00
|
|
|
elseif (EMSCRIPTEN)
|
Make Emscripten build not depend on SDL2 or cubeb
While Emscripten has an SDL compabtility layer, it assumes that the
code is executing in the main browser process (and thus has access to
them DOM). The Infinite Mac project runs emulators in a worker thread
(for better performance) and has a custom API for the display, sound,
input, etc. Similarly, it does not need the cross-platform sound support
from cubeb, there there is a sound API as well.
This commit makes SDL (*_sdl.cpp) and cubeb-based (*_cubeb.cpp) code be
skipped when targeting Emscripten, and instead *_js.cpp files are used
instead (this is the cross-platform convention used by Chromium[^1], and
could be extended for other targets).
For hostevents.cpp and soundserver.cpp the entire file was replaced,
whereas for videoctrl.cpp there was enough shared logic that it was
kept, and the platform-specific bits were moved behind a Display class
that can have per-platform implementations. For cases where we need
additional private fields in the platform-specific classes, we use
a PIMPL pattern.
The *_js.cpp files with implementations are not included in this
commit, since they are closely tied to the Infinite Mac project, and
will live in its fork of DingusPPC.
[^1]: https://www.chromium.org/developers/design-documents/conventions-and-patterns-for-multi-platform-development/
2023-09-04 00:59:35 +00:00
|
|
|
target_link_libraries(dingusppc PRIVATE
|
2023-08-31 06:12:43 +00:00
|
|
|
${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
"-gsource-map"
|
|
|
|
# 256 MB max for emulated Mac RAM, plus 32 MB of emulator overhead
|
|
|
|
"-s INITIAL_MEMORY=301989888"
|
|
|
|
"-s MODULARIZE"
|
|
|
|
"-s EXPORT_ES6"
|
|
|
|
"-s EXPORT_NAME=emulator"
|
|
|
|
"-s 'EXTRA_EXPORTED_RUNTIME_METHODS=[\"FS\"]'")
|
2020-03-23 03:15:12 +00:00
|
|
|
else()
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(dingusppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb
|
|
|
|
${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
2020-03-23 03:15:12 +00:00
|
|
|
endif()
|
|
|
|
|
2023-10-29 19:12:46 +00:00
|
|
|
if (APPLE)
|
|
|
|
find_library(COCOA_LIBRARY Cocoa)
|
|
|
|
target_link_libraries(dingusppc PRIVATE ${COCOA_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2021-10-23 19:51:16 +00:00
|
|
|
if (DPPC_68K_DEBUGGER)
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(dingusppc PRIVATE capstone)
|
2020-12-03 01:18:13 +00:00
|
|
|
endif()
|
|
|
|
|
2021-01-08 19:38:40 +00:00
|
|
|
if (DPPC_BUILD_PPC_TESTS)
|
2022-01-16 21:45:37 +00:00
|
|
|
add_executable(testppc ${TEST_SOURCES} $<TARGET_OBJECTS:core>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:cpu_ppc>
|
2022-01-16 21:45:37 +00:00
|
|
|
$<TARGET_OBJECTS:debugger>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:devices>
|
|
|
|
$<TARGET_OBJECTS:machines>
|
2021-04-13 23:27:07 +00:00
|
|
|
$<TARGET_OBJECTS:utils>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:loguru>)
|
|
|
|
|
|
|
|
if (WIN32)
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(testppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb)
|
2021-01-08 19:38:40 +00:00
|
|
|
else()
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(testppc PRIVATE SDL2::SDL2 SDL2::SDL2main cubeb
|
|
|
|
${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
|
2021-01-08 19:38:40 +00:00
|
|
|
endif()
|
|
|
|
|
2021-10-23 19:51:16 +00:00
|
|
|
if (DPPC_68K_DEBUGGER)
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(testppc PRIVATE capstone)
|
2021-01-08 19:38:40 +00:00
|
|
|
endif()
|
2020-03-23 03:15:12 +00:00
|
|
|
endif()
|
2020-03-19 14:09:24 +00:00
|
|
|
|
2021-01-08 19:38:40 +00:00
|
|
|
if (DPPC_BUILD_BENCHMARKS)
|
|
|
|
file(GLOB BENCH_SOURCES "${PROJECT_SOURCE_DIR}/benchmark/*.cpp")
|
2022-01-16 21:45:37 +00:00
|
|
|
add_executable(bench1 ${BENCH_SOURCES} $<TARGET_OBJECTS:core>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:cpu_ppc>
|
2022-01-16 21:45:37 +00:00
|
|
|
$<TARGET_OBJECTS:debugger>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:devices>
|
|
|
|
$<TARGET_OBJECTS:machines>
|
2021-04-13 23:27:07 +00:00
|
|
|
$<TARGET_OBJECTS:utils>
|
2021-01-08 19:38:40 +00:00
|
|
|
$<TARGET_OBJECTS:loguru>)
|
|
|
|
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(bench1 PRIVATE cubeb SDL2::SDL2 SDL2::SDL2main ${CMAKE_DL_LIBS}
|
2021-01-08 19:38:40 +00:00
|
|
|
${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
|
2021-10-23 19:51:16 +00:00
|
|
|
if (DPPC_68K_DEBUGGER)
|
2023-01-08 22:29:25 +00:00
|
|
|
target_link_libraries(bench1 PRIVATE capstone)
|
2021-01-08 19:38:40 +00:00
|
|
|
endif()
|
2020-03-23 03:15:12 +00:00
|
|
|
endif()
|
2020-03-19 14:09:24 +00:00
|
|
|
|
2021-01-08 19:38:40 +00:00
|
|
|
if (DPPC_BUILD_PPC_TESTS)
|
|
|
|
add_custom_command(
|
|
|
|
TARGET testppc POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcinttests.csv"
|
2021-10-17 21:41:53 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcfloattests.csv"
|
2021-01-08 19:38:40 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcdisasmtest.csv"
|
|
|
|
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
|
2020-12-03 01:18:13 +00:00
|
|
|
endif()
|
2020-11-28 00:08:34 +00:00
|
|
|
|
2020-10-25 23:23:53 +00:00
|
|
|
install (TARGETS dingusppc DESTINATION ${PROJECT_SOURCE_DIR}/build)
|