mirror of https://github.com/mgba-emu/mgba.git
All: Add static library
This commit is contained in:
parent
d99731e1e7
commit
1f6732b9bb
|
@ -253,7 +253,7 @@ if (USE_LZMA)
|
|||
endif()
|
||||
|
||||
# Binaries
|
||||
add_library(${BINARY_NAME} SHARED
|
||||
add_library(${BINARY_NAME}-static STATIC
|
||||
${ARM_SRC}
|
||||
${GBA_SRC}
|
||||
${GBA_SV_SRC}
|
||||
|
@ -263,9 +263,13 @@ add_library(${BINARY_NAME} SHARED
|
|||
${VFS_SRC}
|
||||
${OS_SRC}
|
||||
${THIRD_PARTY_SRC})
|
||||
target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB})
|
||||
install(TARGETS ${BINARY_NAME} DESTINATION lib COMPONENT lib${BINARY_NAME})
|
||||
set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI})
|
||||
set_target_properties(${BINARY_NAME}-static PROPERTIES OUTPUT_NAME ${BINARY_NAME})
|
||||
get_property(STATIC_BINARY TARGET ${BINARY_NAME}-static PROPERTY LOCATION)
|
||||
|
||||
add_library(${BINARY_NAME} SHARED)
|
||||
target_link_libraries(${BINARY_NAME} ${BINARY_NAME}-static m ${DEBUGGER_LIB} ${OS_LIB} ${DEPENDENCY_LIB})
|
||||
install(TARGETS ${BINARY_NAME} ${BINARY_NAME}-static DESTINATION lib COMPONENT lib${BINARY_NAME})
|
||||
set_target_properties(${BINARY_NAME} PROPERTIES VERSION ${LIB_VERSION_STRING} SOVERSION ${LIB_VERSION_ABI} LINKER_LANGUAGE C LINK_FLAGS "-Wl,-force_load,${STATIC_BINARY}")
|
||||
|
||||
if(BUILD_SDL)
|
||||
add_definitions(-DBUILD_SDL)
|
||||
|
|
Loading…
Reference in New Issue