2023-12-27 09:24:00 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
project(Sound)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2024-01-11 22:46:35 +00:00
|
|
|
if (WIN32)
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
|
|
|
endif()
|
2023-12-27 09:24:00 +00:00
|
|
|
|
2024-01-11 22:46:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
2024-01-11 00:34:12 +00:00
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
endif()
|
|
|
|
|
2024-01-11 22:46:35 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-function-declaration")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-return-type")
|
|
|
|
endif()
|
|
|
|
|
2023-12-27 09:24:00 +00:00
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
|
|
|
set(SOURCE_FILES_PC
|
|
|
|
src/pc/main.c
|
|
|
|
src/pc/log.c
|
|
|
|
src/pc/stubs.c
|
|
|
|
src/pc/sotn.c
|
|
|
|
src/pc/pc.c
|
|
|
|
src/pc/sdl2.c
|
2024-01-01 23:31:56 +00:00
|
|
|
src/pc/sim_pc.c
|
2024-01-02 09:22:44 +00:00
|
|
|
src/pc/stage_dummy.c
|
2023-12-27 09:24:00 +00:00
|
|
|
)
|
|
|
|
|
2023-12-27 16:26:24 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND SOURCE_FILES_PC src/pc/plat_win.c)
|
|
|
|
else()
|
|
|
|
list(APPEND SOURCE_FILES_PC src/pc/plat_unix.c)
|
|
|
|
endif()
|
|
|
|
|
2023-12-27 09:24:00 +00:00
|
|
|
set(SOURCE_FILES_PSX_SDK
|
|
|
|
src/main/psxsdk/libgpu/ext.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SOURCE_FILES_MOCK_SDK
|
|
|
|
src/pc/psxsdk/libapi.c
|
|
|
|
src/pc/psxsdk/libetc.c
|
|
|
|
src/pc/psxsdk/libgpu.c
|
|
|
|
src/pc/psxsdk/libgte.c
|
|
|
|
src/pc/psxsdk/libgs.c
|
|
|
|
src/pc/psxsdk/libcd.c
|
|
|
|
src/pc/psxsdk/libcard.c
|
|
|
|
src/pc/psxsdk/libspu.c
|
|
|
|
src/pc/psxsdk/libsnd.c
|
|
|
|
src/pc/psxsdk/cdc.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SOURCE_FILES_3RD
|
|
|
|
src/pc/3rd/cJSON/cJSON.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SOURCE_FILES_DRA
|
|
|
|
src/dra/42398.c
|
|
|
|
src/dra/play.c
|
|
|
|
src/dra/loading.c
|
|
|
|
src/dra/pads.c
|
|
|
|
src/dra/save_mgr_pre.c
|
|
|
|
src/dra/save_mgr.c
|
|
|
|
src/dra/4A538.c
|
|
|
|
src/dra/collider.c
|
|
|
|
src/dra/demo.c
|
2024-01-02 09:22:44 +00:00
|
|
|
src/dra/5087C.c
|
2024-01-07 16:41:18 +00:00
|
|
|
src/dra/lba_stage.c
|
2024-01-07 02:28:34 +00:00
|
|
|
src/dra/config_us.c
|
2023-12-27 09:24:00 +00:00
|
|
|
src/dra/menu.c
|
|
|
|
src/dra/5D6C4.c
|
|
|
|
src/dra/627C4.c
|
|
|
|
src/dra/63ED4.c
|
|
|
|
src/dra/91EBC.c
|
|
|
|
src/dra/92F60.c
|
|
|
|
src/dra/93290.c
|
|
|
|
src/dra/93BDC.c
|
|
|
|
src/dra/94F50.c
|
|
|
|
src/dra/953A0.c
|
|
|
|
)
|
|
|
|
|
2024-01-11 20:13:33 +00:00
|
|
|
set(SOURCE_FILES_STAGE_SEL
|
|
|
|
src/pc/stage_sel.c
|
|
|
|
src/st/sel/banks.c
|
|
|
|
src/st/sel/CD54.c
|
|
|
|
src/st/sel/2C048.c
|
|
|
|
src/st/sel/33164.c
|
|
|
|
src/st/sel/3410C.c
|
|
|
|
src/st/sel/3585C.c
|
|
|
|
src/st/sel/3642C.c
|
|
|
|
)
|
|
|
|
|
2023-12-27 09:24:00 +00:00
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
${SOURCE_FILES_PC}
|
|
|
|
${SOURCE_FILES_PSX_SDK}
|
|
|
|
${SOURCE_FILES_MOCK_SDK}
|
|
|
|
${SOURCE_FILES_3RD}
|
|
|
|
${SOURCE_FILES_DRA}
|
2024-01-11 20:13:33 +00:00
|
|
|
${SOURCE_FILES_STAGE_SEL}
|
|
|
|
)
|
2023-12-27 09:24:00 +00:00
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
|
|
|
${SDL2_INCLUDE_DIRS}
|
|
|
|
include
|
|
|
|
src/dra
|
|
|
|
src/pc/3rd
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
|
|
${SDL2_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
|
|
|
VERSION_PC
|
|
|
|
PERMUTER
|
|
|
|
NON_MATCHING
|
2024-01-11 20:13:33 +00:00
|
|
|
HARD_LINK
|
2023-12-27 09:24:00 +00:00
|
|
|
DEMO_KEY_PTR=0
|
|
|
|
_internal_version_us
|
|
|
|
)
|