mirror of
https://github.com/libretro/hatari.git
synced 2026-11-07 10:36:00 -10:00
Add static builds to retro core
This commit is contained in:
1 parent
971f99d99c
commit
179c5df8ec
6 files changed
+22
-10
No files matched your search
@@ -57,6 +57,8 @@ option(ENABLE_DSP_EMU "Enable DSP 56k emulator for Falcon mode" ON)
|
||||
option(ENABLE_TRACING "Enable tracing messages for debugging" ON)
|
||||
option(ENABLE_TOOLS "Build the Hatari tools" ON)
|
||||
|
||||
option(LIBRETRO_STATIC "Set STATIC mode for compiling libretro core" OFF)
|
||||
|
||||
if(ENABLE_LIBRETRO)
|
||||
set(LIBRETRO_INCLUDE_DIR
|
||||
"${CMAKE_SOURCE_DIR}/src/retro/libretro-common/include"
|
||||
|
||||
+11
-3
@@ -168,8 +168,10 @@ endif()
|
||||
if(ENABLE_LIBRETRO)
|
||||
add_subdirectory(retro)
|
||||
|
||||
set_target_properties(Core PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
set_target_properties(CoreHmsa PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
if(NOT LIBRETRO_STATIC)
|
||||
set_target_properties(Core PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
set_target_properties(CoreHmsa PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif(NOT LIBRETRO_STATIC)
|
||||
endif(ENABLE_LIBRETRO)
|
||||
|
||||
if(ENABLE_HATARI)
|
||||
@@ -320,7 +322,13 @@ else()
|
||||
endif()
|
||||
|
||||
if(ENABLE_LIBRETRO)
|
||||
add_library(retro-hatari MODULE
|
||||
if(LIBRETRO_STATIC)
|
||||
set(LIBRETRO_TYPE STATIC)
|
||||
else()
|
||||
set(LIBRETRO_TYPE MODULE)
|
||||
endif()
|
||||
|
||||
add_library(retro-hatari ${LIBRETRO_TYPE}
|
||||
$<TARGET_OBJECTS:Core>
|
||||
$<TARGET_OBJECTS:CoreHmsa>
|
||||
$<TARGET_OBJECTS:Falcon>
|
||||
|
||||
@@ -99,6 +99,6 @@ endif()
|
||||
add_library(UaeCpu OBJECT ${CPUEMU_SRCS} ${WINUAE_SRCS} custom.c events.c
|
||||
memory.c hatari-glue.c)
|
||||
|
||||
if(ENABLE_LIBRETRO)
|
||||
if(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
set_target_properties(UaeCpu PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif(ENABLE_LIBRETRO)
|
||||
endif(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
@@ -28,7 +28,7 @@ add_library(DebugUT OBJECT
|
||||
symbols.c
|
||||
vars.c)
|
||||
|
||||
if(ENABLE_LIBRETRO)
|
||||
if(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
set_target_properties(Debug PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
set_target_properties(DebugUT PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif(ENABLE_LIBRETRO)
|
||||
endif(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
@@ -5,6 +5,6 @@ endif(ENABLE_DSP_EMU)
|
||||
|
||||
add_library(Falcon OBJECT crossbar.c nvram.c videl.c dsp.c ${DSP_SOURCES})
|
||||
|
||||
if(ENABLE_LIBRETRO)
|
||||
if(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
set_target_properties(Falcon PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif(ENABLE_LIBRETRO)
|
||||
endif(ENABLE_LIBRETRO AND NOT LIBRETRO_STATIC)
|
||||
@@ -18,4 +18,6 @@ add_library(UiRetro OBJECT
|
||||
vfs.c)
|
||||
|
||||
target_include_directories(UiRetro PRIVATE ${LIBRETRO_INCLUDE_DIR})
|
||||
set_target_properties(UiRetro PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
if(NOT LIBRETRO_STATIC)
|
||||
set_target_properties(UiRetro PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif(NOT LIBRETRO_STATIC)
|
||||
Reference in new issue
Block a user