Skip to content
Snippets Groups Projects
Commit 6c7317fc authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Add libretro support to CMake

parent 38b5c2b2
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,12 @@ if(NOT WITHOUT_SDL)
endif()
endif()
if(NOT WITHOUT_RETRO)
list(APPEND SOURCE retro.c)
set(NEED_BITMAP TRUE)
set(NEED_SCALE TRUE)
endif()
if(NEED_BITMAP)
list(APPEND SOURCE bitmap_con.c)
endif()
......@@ -200,6 +206,10 @@ if(USE_CURSES_ANYWAY)
endif()
endif()
if(NOT WITHOUT_RETRO)
target_compile_definitions(ciolib PUBLIC WITH_RETRO)
endif()
if(HAVE_VASPRINTF)
target_compile_definitions(ciolib PRIVATE HAVE_VASPRINTF)
endif()
......
......@@ -5,6 +5,7 @@ project (SyncTERM C)
set(WITHOUT_CRYPTLIB OFF CACHE BOOL "Disable cryptlib (ssh and telnet over TLS")
set(WITHOUT_OOII OFF CACHE BOOL "Disable Operation Overkill ][ Terminal")
set(WITHOUT_JPEG_XL OFF CACHE BOOL "Disable JPEG XL")
set(WITHOUT_RETRO ON CACHE BOOL "Disable libretro")
# CPack stuff...
set(CPACK_PACKAGE_NAME SyncTERM)
......@@ -98,7 +99,12 @@ else()
set(WIN_MAIN_TYPE WIN32)
endif()
add_executable(syncterm MACOSX_BUNDLE ${WIN_MAIN_TYPE} ${SOURCE})
if(NOT WITHOUT_RETRO)
add_library(syncterm SHARED ${SOURCE})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
else()
add_executable(syncterm MACOSX_BUNDLE ${WIN_MAIN_TYPE} ${SOURCE})
endif()
set_target_properties(syncterm PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
......@@ -151,6 +157,10 @@ if(NOT WITHOUT_JPEG_XL)
endif()
endif()
if(NOT WITHOUT_RETRO)
target_compile_definitions(syncterm PUBLIC WITH_RETRO)
endif()
install(TARGETS syncterm DESTINATION bin)
if(UNIX)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/syncterm.man TYPE MAN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment