2019-07-07 06:10:32 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
project(dingusppc)
|
2019-12-16 15:31:33 +00:00
|
|
|
|
2019-07-07 06:10:32 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
2019-12-14 19:56:43 +00:00
|
|
|
|
2019-07-07 06:10:32 +00:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2019-12-15 23:24:14 +00:00
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
2019-12-16 15:31:33 +00:00
|
|
|
|
2020-02-03 13:36:30 +00:00
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/cpu/ppc/")
|
|
|
|
add_subdirectory("${PROJECT_SOURCE_DIR}/devices/")
|
|
|
|
|
2019-12-16 15:31:33 +00:00
|
|
|
include_directories("${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/devices"
|
2020-02-03 13:36:30 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc"
|
|
|
|
"${PROJECT_SOURCE_DIR}/debugger")
|
|
|
|
|
|
|
|
file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/*.cpp"
|
|
|
|
"${PROJECT_SOURCE_DIR}/debugger/*.cpp")
|
2019-12-16 15:31:33 +00:00
|
|
|
|
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
|
|
|
|
2020-02-03 13:36:30 +00:00
|
|
|
add_executable(dingusppc ${SOURCES} $<TARGET_OBJECTS:cpu_ppc> $<TARGET_OBJECTS:devices>)
|
2020-01-31 03:10:53 +00:00
|
|
|
|
2020-02-03 13:36:30 +00:00
|
|
|
add_executable(testppc ${TEST_SOURCES} $<TARGET_OBJECTS:cpu_ppc> $<TARGET_OBJECTS:devices>)
|
2020-01-31 03:10:53 +00:00
|
|
|
|
2020-02-03 13:36:30 +00:00
|
|
|
add_custom_command(
|
2020-02-10 15:41:40 +00:00
|
|
|
TARGET testppc POST_BUILD
|
2020-02-03 13:36:30 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcinttests.csv"
|
2020-02-12 21:58:24 +00:00
|
|
|
"${PROJECT_SOURCE_DIR}/cpu/ppc/test/ppcdisasmtest.csv"
|
2020-02-03 13:36:30 +00:00
|
|
|
$<TARGET_FILE_DIR:${PROJECT_NAME}>)
|
2020-01-31 03:10:53 +00:00
|
|
|
|
2019-12-15 23:24:14 +00:00
|
|
|
install (TARGETS dingusppc DESTINATION ${EXECUTABLE_OUTPUT_PATH})
|