2020-12-12 13:45:37 +00:00
|
|
|
# there is no simple package for libretro-common
|
|
|
|
# this requires user input
|
|
|
|
set(LIBRETRO_PATH NONE CACHE PATH "path to libretro-common")
|
2020-12-11 08:16:12 +00:00
|
|
|
|
2020-12-23 19:36:11 +00:00
|
|
|
if (EXISTS ${LIBRETRO_PATH}/include/libretro.h)
|
2020-12-12 13:45:37 +00:00
|
|
|
message("Using LIBRETRO_PATH=${LIBRETRO_PATH}")
|
2020-12-11 08:16:12 +00:00
|
|
|
|
2020-12-12 13:45:37 +00:00
|
|
|
add_library(ra2 SHARED
|
|
|
|
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-12 13:45:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(ra2 PRIVATE
|
|
|
|
${LIBRETRO_PATH}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(ra2 PRIVATE
|
|
|
|
appleii
|
|
|
|
common2
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
message("Bad LIBRETRO_PATH=${LIBRETRO_PATH}, skipping libretro code")
|
|
|
|
endif()
|