Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libretro port. #51

Merged
merged 1 commit into from Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add libretro port.
  • Loading branch information
宋文武 committed May 3, 2024
commit db6b35581357db6f178b82bde04db1450db2edc4
29 changes: 29 additions & 0 deletions cpymo-backends/libretro/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.9)
project(cpymo-libretro C)

option(LIBRETRO_STATIC "Statically link the libretro core" OFF)

set(SOURCES
libretro.c
)
aux_source_directory(../../cpymo SOURCES)
aux_source_directory(../software SOURCES)

if (LIBRETRO_STATIC)
add_library(cpymo_libretro STATIC ${SOURCES})
else ()
add_library(cpymo_libretro SHARED ${SOURCES})
endif ()

target_compile_definitions(cpymo_libretro PRIVATE
-DTEXT_CHARACTER_W_SCALE=1 -DDISABLE_MOVIE
)
target_link_options(cpymo_libretro PRIVATE
-Wl,--version-script=${CMAKE_SOURCE_DIR}/link.T
-Wl,--no-undefined -lm
# TODO: link ffmpeg statically
-lavcodec -lavformat -lavutil -lswresample
)

# Follow naming conventions for libretro cores
set_target_properties(cpymo_libretro PROPERTIES PREFIX "")
24 changes: 24 additions & 0 deletions cpymo-backends/libretro/cpymo_libretro.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Software Information
display_name = "CPyMO"
display_version = "1.1.9"
authors = "Seng Jik"
categories = "Game engine"
license = "AGPLv3+"
permissions = ""
supported_extensions = "txt"

# Hardware Information
manufacturer = "Strrationalism"
systemname = "CPyMO"
systemid = "cpymo"

# Libretro Features
database = "CPyMO"
supports_no_game = "false"
libretro_saves = "false"
cheats = "false"
needs_fullpath = "true"
disk_control = "false"
is_experimental = "true"

description = "A port of the CPyMO visual novel games engine to libretro."
Loading