client/common: create a combined .a on mac

Generate a combined archive of all the client related functions (channels/common..) to
minimize dependencies for linking.
The archive is called libfreerdp-client-combined.a and is only generated on iOS when doing a
monolithic static build.
This commit is contained in:
Bernhard Miklautz 2013-03-25 18:16:05 +01:00
parent 10a92074c5
commit 370ec5097b
1 changed files with 10 additions and 0 deletions

View File

@ -61,3 +61,13 @@ if(BUILD_TESTING)
add_subdirectory(test) add_subdirectory(test)
endif() endif()
if(IOS AND MONOLITHIC_BUILD AND (NOT BUILD_SHARED_LIBS))
# generate combined library
foreach(af ${${MODULE_PREFIX}_LIBS})
get_target_property(LOC ${af} LOCATION)
if ((NOT (${LOC} MATCHES ".*libfreerdp.a$")) AND (NOT (${LOC} MATCHES ".*libwinpr.a$")))
set(ALIST ${ALIST} ${LOC})
endif()
endforeach()
add_custom_command(TARGET ${MODULE_NAME} POST_BUILD COMMAND libtool -static -o libfreerdp-client-combined.a ${ALIST})
endif()