2020-08-23 02:30:12 +00:00
|
|
|
# We define our own compilation flags here.
|
2020-10-03 22:36:02 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2020-08-27 00:02:44 +00:00
|
|
|
|
2023-07-16 15:13:48 +00:00
|
|
|
# Set a more convenient ARM flag
|
|
|
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
|
|
|
|
set(ARM64_ARCH TRUE)
|
|
|
|
message(STATUS "ARM64 architecture detected")
|
|
|
|
else()
|
|
|
|
set(ARM64_ARCH FALSE)
|
|
|
|
message(STATUS "Non-ARM64 architecture detected")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ARM64_ARCH)
|
|
|
|
# Add your ARM64-specific configuration or build options here
|
|
|
|
set(OG_ASM_FUNCS_FILE kernel/asm_funcs_arm64.s)
|
|
|
|
enable_language(ASM)
|
|
|
|
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_SOURCE_FILE_EXTENSIONS} s)
|
|
|
|
# set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_ASM_COMPILER} -o <OBJECT> <SOURCE>")
|
|
|
|
set_source_files_properties(${OG_ASM_FUNCS_FILE} PROPERTIES COMPILE_FLAGS "-g")
|
|
|
|
else()
|
|
|
|
set(OG_ASM_FUNCS_FILE kernel/asm_funcs_x86_64.asm)
|
|
|
|
enable_language(ASM_NASM)
|
|
|
|
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS} asm)
|
|
|
|
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
|
|
|
|
set_source_files_properties(${OG_ASM_FUNCS_FILE} PROPERTIES COMPILE_FLAGS "-g")
|
|
|
|
endif()
|
|
|
|
|
2020-08-23 02:30:12 +00:00
|
|
|
set(RUNTIME_SOURCE
|
2023-06-17 04:16:40 +00:00
|
|
|
external/discord_jak1.cpp
|
|
|
|
external/discord_jak2.cpp
|
2023-07-09 01:53:39 +00:00
|
|
|
external/discord.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
graphics/display.cpp
|
2023-07-01 01:05:58 +00:00
|
|
|
graphics/gfx_test.cpp
|
2023-07-09 01:53:39 +00:00
|
|
|
graphics/gfx.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
graphics/jak2_texture_remap.cpp
|
|
|
|
graphics/opengl_renderer/background/background_common.cpp
|
|
|
|
graphics/opengl_renderer/background/Shrub.cpp
|
|
|
|
graphics/opengl_renderer/background/TFragment.cpp
|
|
|
|
graphics/opengl_renderer/background/Tie3.cpp
|
|
|
|
graphics/opengl_renderer/BlitDisplays.cpp
|
|
|
|
graphics/opengl_renderer/BucketRenderer.cpp
|
|
|
|
graphics/opengl_renderer/CollideMeshRenderer.cpp
|
|
|
|
graphics/opengl_renderer/debug_gui.cpp
|
|
|
|
graphics/opengl_renderer/DepthCue.cpp
|
|
|
|
graphics/opengl_renderer/DirectRenderer.cpp
|
|
|
|
graphics/opengl_renderer/DirectRenderer2.cpp
|
|
|
|
graphics/opengl_renderer/dma_helpers.cpp
|
|
|
|
graphics/opengl_renderer/EyeRenderer.cpp
|
|
|
|
graphics/opengl_renderer/foreground/Generic2_Build.cpp
|
|
|
|
graphics/opengl_renderer/foreground/Generic2_DMA.cpp
|
|
|
|
graphics/opengl_renderer/foreground/Generic2_OpenGL.cpp
|
|
|
|
graphics/opengl_renderer/foreground/Generic2.cpp
|
2023-06-17 21:23:25 +00:00
|
|
|
graphics/opengl_renderer/foreground/Generic2BucketRenderer.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
graphics/opengl_renderer/foreground/Merc2.cpp
|
2023-06-17 21:23:25 +00:00
|
|
|
graphics/opengl_renderer/foreground/Merc2BucketRenderer.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
graphics/opengl_renderer/foreground/Shadow2.cpp
|
|
|
|
graphics/opengl_renderer/loader/Loader.cpp
|
|
|
|
graphics/opengl_renderer/loader/LoaderStages.cpp
|
|
|
|
graphics/opengl_renderer/ocean/CommonOceanRenderer.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanMid_PS2.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanMid.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanMidAndFar.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanNear_PS2.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanNear.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanTexture_PC.cpp
|
|
|
|
graphics/opengl_renderer/ocean/OceanTexture.cpp
|
|
|
|
graphics/opengl_renderer/opengl_utils.cpp
|
|
|
|
graphics/opengl_renderer/OpenGLRenderer.cpp
|
|
|
|
graphics/opengl_renderer/Profiler.cpp
|
|
|
|
graphics/opengl_renderer/ProgressRenderer.cpp
|
|
|
|
graphics/opengl_renderer/Shader.cpp
|
|
|
|
graphics/opengl_renderer/Shadow_PS2.cpp
|
|
|
|
graphics/opengl_renderer/ShadowRenderer.cpp
|
|
|
|
graphics/opengl_renderer/SkyBlendCPU.cpp
|
|
|
|
graphics/opengl_renderer/SkyBlendGPU.cpp
|
|
|
|
graphics/opengl_renderer/SkyRenderer.cpp
|
|
|
|
graphics/opengl_renderer/sprite/GlowRenderer.cpp
|
|
|
|
graphics/opengl_renderer/sprite/Sprite3_Distort.cpp
|
|
|
|
graphics/opengl_renderer/sprite/Sprite3_Glow.cpp
|
|
|
|
graphics/opengl_renderer/sprite/Sprite3.cpp
|
2023-06-24 14:11:47 +00:00
|
|
|
graphics/opengl_renderer/TextureAnimator.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
graphics/opengl_renderer/TextureUploadHandler.cpp
|
|
|
|
graphics/opengl_renderer/VisDataHandler.cpp
|
|
|
|
graphics/opengl_renderer/Warp.cpp
|
|
|
|
graphics/pipelines/opengl.cpp
|
|
|
|
graphics/sceGraphicsInterface.cpp
|
|
|
|
graphics/texture/jak1_tpage_dir.cpp
|
|
|
|
graphics/texture/jak2_tpage_dir.cpp
|
|
|
|
graphics/texture/TextureConverter.cpp
|
|
|
|
graphics/texture/TexturePool.cpp
|
2023-07-16 15:13:48 +00:00
|
|
|
${OG_ASM_FUNCS_FILE}
|
2022-06-26 22:17:11 +00:00
|
|
|
kernel/common/fileio.cpp
|
|
|
|
kernel/common/kboot.cpp
|
|
|
|
kernel/common/kdgo.cpp
|
|
|
|
kernel/common/kdsnetm.cpp
|
|
|
|
kernel/common/klink.cpp
|
|
|
|
kernel/common/klisten.cpp
|
|
|
|
kernel/common/kmachine.cpp
|
|
|
|
kernel/common/kmalloc.cpp
|
|
|
|
kernel/common/kmemcard.cpp
|
|
|
|
kernel/common/kprint.cpp
|
|
|
|
kernel/common/kscheme.cpp
|
|
|
|
kernel/common/ksocket.cpp
|
|
|
|
kernel/common/ksound.cpp
|
|
|
|
kernel/jak1/fileio.cpp
|
|
|
|
kernel/jak1/kboot.cpp
|
|
|
|
kernel/jak1/kdgo.cpp
|
|
|
|
kernel/jak1/klink.cpp
|
|
|
|
kernel/jak1/klisten.cpp
|
|
|
|
kernel/jak1/kmachine.cpp
|
|
|
|
kernel/jak1/kprint.cpp
|
|
|
|
kernel/jak1/kscheme.cpp
|
|
|
|
kernel/jak1/ksound.cpp
|
|
|
|
kernel/jak2/fileio.cpp
|
|
|
|
kernel/jak2/kboot.cpp
|
|
|
|
kernel/jak2/kdgo.cpp
|
|
|
|
kernel/jak2/klink.cpp
|
|
|
|
kernel/jak2/klisten.cpp
|
|
|
|
kernel/jak2/kmachine.cpp
|
|
|
|
kernel/jak2/kmalloc.cpp
|
|
|
|
kernel/jak2/kprint.cpp
|
|
|
|
kernel/jak2/kscheme.cpp
|
|
|
|
kernel/jak2/ksound.cpp
|
2024-01-17 00:24:02 +00:00
|
|
|
kernel/jak3/fileio.cpp
|
|
|
|
kernel/jak3/kboot.cpp
|
|
|
|
kernel/jak3/kdgo.cpp
|
|
|
|
kernel/jak3/kdsnetm.cpp
|
|
|
|
kernel/jak3/klink.cpp
|
|
|
|
kernel/jak3/klisten.cpp
|
|
|
|
kernel/jak3/kmachine.cpp
|
|
|
|
kernel/jak3/kmalloc.cpp
|
|
|
|
kernel/jak3/kmemcard.cpp
|
|
|
|
kernel/jak3/kprint.cpp
|
|
|
|
kernel/jak3/kscheme.cpp
|
|
|
|
kernel/jak3/ksocket.cpp
|
|
|
|
kernel/jak3/ksound.cpp
|
2022-08-26 22:03:48 +00:00
|
|
|
mips2c/jak1_functions/bones.cpp
|
|
|
|
mips2c/jak1_functions/collide_cache.cpp
|
|
|
|
mips2c/jak1_functions/collide_edge_grab.cpp
|
|
|
|
mips2c/jak1_functions/collide_func.cpp
|
|
|
|
mips2c/jak1_functions/collide_mesh.cpp
|
|
|
|
mips2c/jak1_functions/collide_probe.cpp
|
|
|
|
mips2c/jak1_functions/draw_string.cpp
|
|
|
|
mips2c/jak1_functions/generic_effect.cpp
|
|
|
|
mips2c/jak1_functions/generic_effect2.cpp
|
|
|
|
mips2c/jak1_functions/generic_merc.cpp
|
|
|
|
mips2c/jak1_functions/generic_tie.cpp
|
|
|
|
mips2c/jak1_functions/joint.cpp
|
|
|
|
mips2c/jak1_functions/merc_blend_shape.cpp
|
|
|
|
mips2c/jak1_functions/ocean_vu0.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak1_functions/ocean.cpp
|
2022-08-26 22:03:48 +00:00
|
|
|
mips2c/jak1_functions/ripple.cpp
|
|
|
|
mips2c/jak1_functions/shadow.cpp
|
|
|
|
mips2c/jak1_functions/sky_tng.cpp
|
|
|
|
mips2c/jak1_functions/sparticle_launcher.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak1_functions/sparticle.cpp
|
2022-08-26 22:03:48 +00:00
|
|
|
mips2c/jak1_functions/test_func.cpp
|
|
|
|
mips2c/jak1_functions/texture.cpp
|
|
|
|
mips2c/jak1_functions/tfrag.cpp
|
|
|
|
mips2c/jak1_functions/tie_methods.cpp
|
|
|
|
mips2c/jak1_functions/time_of_day.cpp
|
2022-12-01 03:36:09 +00:00
|
|
|
mips2c/jak2_functions/bones.cpp
|
2022-11-20 16:32:29 +00:00
|
|
|
mips2c/jak2_functions/collide_cache.cpp
|
2022-10-30 19:54:10 +00:00
|
|
|
mips2c/jak2_functions/collide_edge_grab.cpp
|
2022-08-26 22:03:48 +00:00
|
|
|
mips2c/jak2_functions/collide_func.cpp
|
2022-10-30 00:32:03 +00:00
|
|
|
mips2c/jak2_functions/collide_hash.cpp
|
2022-10-30 19:54:10 +00:00
|
|
|
mips2c/jak2_functions/collide_mesh.cpp
|
2022-10-01 17:39:56 +00:00
|
|
|
mips2c/jak2_functions/debug.cpp
|
2022-09-06 00:29:12 +00:00
|
|
|
mips2c/jak2_functions/font.cpp
|
2022-12-01 03:36:09 +00:00
|
|
|
mips2c/jak2_functions/foreground.cpp
|
2023-04-16 22:05:35 +00:00
|
|
|
mips2c/jak2_functions/generic_effect.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak2_functions/generic_merc.cpp
|
2022-08-28 20:38:58 +00:00
|
|
|
mips2c/jak2_functions/joint.cpp
|
2022-12-02 15:02:13 +00:00
|
|
|
mips2c/jak2_functions/lights.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak2_functions/merc_blend_shape.cpp
|
2023-01-01 17:11:18 +00:00
|
|
|
mips2c/jak2_functions/nav_control.cpp
|
|
|
|
mips2c/jak2_functions/nav_mesh.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak2_functions/ocean_vu0.cpp
|
|
|
|
mips2c/jak2_functions/ocean.cpp
|
|
|
|
mips2c/jak2_functions/ripple.cpp
|
|
|
|
mips2c/jak2_functions/shadow.cpp
|
2022-10-08 21:02:40 +00:00
|
|
|
mips2c/jak2_functions/sky.cpp
|
2022-10-09 23:56:07 +00:00
|
|
|
mips2c/jak2_functions/sparticle_launcher.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak2_functions/sparticle.cpp
|
2022-11-11 21:23:26 +00:00
|
|
|
mips2c/jak2_functions/spatial_hash.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/jak2_functions/squid.cpp
|
2022-09-11 18:17:55 +00:00
|
|
|
mips2c/jak2_functions/texture.cpp
|
2023-03-30 00:28:48 +00:00
|
|
|
mips2c/jak2_functions/vortex.cpp
|
2024-02-11 14:50:07 +00:00
|
|
|
mips2c/jak3_functions/collide_func.cpp
|
2024-02-04 13:40:43 +00:00
|
|
|
mips2c/jak3_functions/lights.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
mips2c/mips2c_table.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/common/dma.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/common/fake_iso.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/common/iso_api.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/common/iso.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/common/isocommon.cpp
|
|
|
|
overlord/common/overlord.cpp
|
|
|
|
overlord/common/sbank.cpp
|
|
|
|
overlord/common/soundcommon.cpp
|
|
|
|
overlord/common/srpc.cpp
|
|
|
|
overlord/common/ssound.cpp
|
|
|
|
overlord/jak1/dma.cpp
|
|
|
|
overlord/jak1/fake_iso.cpp
|
|
|
|
overlord/jak1/iso_api.cpp
|
|
|
|
overlord/jak1/iso_queue.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak1/iso.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak1/isocommon.cpp
|
|
|
|
overlord/jak1/overlord.cpp
|
|
|
|
overlord/jak1/ramdisk.cpp
|
|
|
|
overlord/jak1/srpc.cpp
|
|
|
|
overlord/jak1/ssound.cpp
|
|
|
|
overlord/jak1/stream.cpp
|
|
|
|
overlord/jak2/dma.cpp
|
|
|
|
overlord/jak2/iso_api.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak2/iso_cd.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak2/iso_queue.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak2/iso.cpp
|
|
|
|
overlord/jak2/list.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak2/overlord.cpp
|
|
|
|
overlord/jak2/pages.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak2/spustreams.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak2/srpc.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak2/ssound.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak2/stream.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
overlord/jak2/streamlfo.cpp
|
|
|
|
overlord/jak2/streamlist.cpp
|
2023-04-29 20:13:57 +00:00
|
|
|
overlord/jak2/vag.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
runtime.cpp
|
|
|
|
sce/deci2.cpp
|
|
|
|
sce/iop.cpp
|
|
|
|
sce/libcdvd_ee.cpp
|
|
|
|
sce/libdma.cpp
|
|
|
|
sce/libgraph.cpp
|
|
|
|
sce/libpad.cpp
|
|
|
|
sce/libscf.cpp
|
|
|
|
sce/sif_ee_memcard.cpp
|
|
|
|
sce/sif_ee.cpp
|
|
|
|
sce/stubs.cpp
|
2023-06-04 19:34:37 +00:00
|
|
|
settings/settings.cpp
|
2023-10-12 00:43:55 +00:00
|
|
|
system/background_worker.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
system/Deci2Server.cpp
|
2023-06-04 19:34:37 +00:00
|
|
|
system/hid/devices/game_controller.cpp
|
|
|
|
system/hid/devices/keyboard.cpp
|
|
|
|
system/hid/devices/mouse.cpp
|
|
|
|
system/hid/display_manager.cpp
|
|
|
|
system/hid/input_bindings.cpp
|
|
|
|
system/hid/input_manager.cpp
|
|
|
|
system/hid/sdl_util.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
system/IOP_Kernel.cpp
|
|
|
|
system/iop_thread.cpp
|
|
|
|
system/SystemThread.cpp
|
|
|
|
tools/filter_menu/filter_menu.cpp
|
2023-07-09 01:53:39 +00:00
|
|
|
tools/subtitle_editor/subtitle_editor_db.cpp
|
|
|
|
tools/subtitle_editor/subtitle_editor_repl_client.cpp
|
|
|
|
tools/subtitle_editor/subtitle_editor.cpp
|
2023-05-07 17:54:33 +00:00
|
|
|
)
|
2020-08-23 02:30:12 +00:00
|
|
|
|
2022-05-19 20:54:36 +00:00
|
|
|
add_subdirectory(sound)
|
|
|
|
|
2021-01-06 17:16:39 +00:00
|
|
|
# we build the runtime as a static library.
|
2021-03-11 17:54:16 +00:00
|
|
|
add_library(runtime STATIC ${RUNTIME_SOURCE} "../third-party/glad/src/glad.c")
|
2020-08-23 02:30:12 +00:00
|
|
|
|
2023-10-12 00:43:55 +00:00
|
|
|
target_link_libraries(runtime common fmt SDL2::SDL2 imgui discord-rpc sound stb_image libco libcurl)
|
2021-02-04 02:29:46 +00:00
|
|
|
if(WIN32)
|
2021-01-06 17:16:39 +00:00
|
|
|
target_link_libraries(runtime mman)
|
2021-02-04 02:29:46 +00:00
|
|
|
else()
|
2021-03-11 17:54:16 +00:00
|
|
|
target_link_libraries(runtime pthread dl)
|
2021-02-04 02:29:46 +00:00
|
|
|
endif()
|
2020-09-24 21:19:23 +00:00
|
|
|
|
2023-01-02 15:05:22 +00:00
|
|
|
add_executable(gk main.cpp)
|
2021-01-06 17:16:39 +00:00
|
|
|
target_link_libraries(gk runtime)
|