Commit 027b97f7 authored by Nicolas Michon's avatar Nicolas Michon Committed by jehan

Use exported variable from ms2 for plugins installation

parent 8a90f395
......@@ -43,18 +43,14 @@ if(ENABLE_WIDEBAND)
list(APPEND LIBS ${OPENCOREAMRWB_LIBRARIES} ${VOAMRWBENC_LIBRARIES})
endif()
if (APPLE AND NOT IOS)
set(MS2_FRAMEWORK_PLUGIN_DIR "${MEDIASTREAMER2_PLUGINS_LOCATION}")
else()
set(MS2_FRAMEWORK_PLUGIN_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins")
endif()
set(MS2_PLUGINS_DIR "${MEDIASTREAMER2_PLUGINS_LOCATION}")
if(ENABLE_STATIC)
add_library(msamr-static STATIC ${SOURCE_FILES})
set_target_properties(msamr-static PROPERTIES OUTPUT_NAME msamr)
target_link_libraries(msamr-static ${LIBS})
install(TARGETS msamr-static
ARCHIVE DESTINATION "${MS2_FRAMEWORK_PLUGIN_DIR}"
ARCHIVE DESTINATION "${MS2_PLUGINS_DIR}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
......@@ -68,6 +64,12 @@ if(ENABLE_SHARED)
if(APPLE)
if(IOS)
set(MIN_OS ${LINPHONE_IOS_DEPLOYMENT_TARGET})
set_target_properties(msamr PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER org.linphone.msamr
MACOSX_FRAMEWORK_INFO_PLIST Info.plist.in
)
else()
set(MIN_OS ${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
......@@ -84,9 +86,9 @@ if(ENABLE_SHARED)
endif()
install(TARGETS msamr
RUNTIME DESTINATION "${MS2_FRAMEWORK_PLUGIN_DIR}"
LIBRARY DESTINATION "${MS2_FRAMEWORK_PLUGIN_DIR}"
ARCHIVE DESTINATION "${MS2_FRAMEWORK_PLUGIN_DIR}"
RUNTIME DESTINATION "${MS2_PLUGINS_DIR}"
LIBRARY DESTINATION "${MS2_PLUGINS_DIR}"
ARCHIVE DESTINATION "${MS2_PLUGINS_DIR}"
FRAMEWORK DESTINATION Frameworks
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment