2020-12-12 13:45:37 +00:00
|
|
|
# there is no simple package for libretro-common
|
|
|
|
# this requires user input
|
2020-12-26 19:31:07 +00:00
|
|
|
set(LIBRETRO_COMMON_PATH NONE CACHE PATH "path to libretro-common")
|
2020-12-11 08:16:12 +00:00
|
|
|
|
2020-12-26 19:31:07 +00:00
|
|
|
if (EXISTS ${LIBRETRO_COMMON_PATH}/include/libretro.h)
|
|
|
|
message("Using LIBRETRO_COMMON_PATH=${LIBRETRO_COMMON_PATH}")
|
2020-12-11 08:16:12 +00:00
|
|
|
|
2020-12-26 20:38:30 +00:00
|
|
|
add_library(applewin_libretro SHARED
|
2020-12-12 13:45:37 +00:00
|
|
|
environment.cpp
|
|
|
|
libretro.cpp
|
|
|
|
bitmaps.cpp
|
|
|
|
rdirectsound.cpp
|
|
|
|
interface.cpp
|
|
|
|
game.cpp
|
2020-12-23 16:38:22 +00:00
|
|
|
joypadbase.cpp
|
2020-12-19 14:26:48 +00:00
|
|
|
joypad.cpp
|
2020-12-23 16:38:22 +00:00
|
|
|
analog.cpp
|
2020-12-25 21:59:48 +00:00
|
|
|
rdirectsound.cpp
|
2020-12-28 15:04:24 +00:00
|
|
|
retroregistry.cpp
|
2020-12-12 13:45:37 +00:00
|
|
|
)
|
|
|
|
|
2020-12-26 20:38:30 +00:00
|
|
|
target_include_directories(applewin_libretro PRIVATE
|
2020-12-26 19:31:07 +00:00
|
|
|
${LIBRETRO_COMMON_PATH}/include
|
2020-12-12 13:45:37 +00:00
|
|
|
)
|
|
|
|
|
2020-12-26 20:38:30 +00:00
|
|
|
target_link_libraries(applewin_libretro PRIVATE
|
2020-12-12 13:45:37 +00:00
|
|
|
appleii
|
|
|
|
common2
|
|
|
|
)
|
2020-12-26 20:38:30 +00:00
|
|
|
|
|
|
|
# just call it "applewin_libretro.so" as per libretro standard
|
|
|
|
set_target_properties(applewin_libretro PROPERTIES PREFIX "")
|
|
|
|
|
2020-12-12 13:45:37 +00:00
|
|
|
else()
|
2020-12-26 19:31:07 +00:00
|
|
|
message("Bad LIBRETRO_COMMON_PATH=${LIBRETRO_COMMON_PATH}, skipping libretro code")
|
2020-12-12 13:45:37 +00:00
|
|
|
endif()
|