Commit 07d4c336 authored by Nicolas Michon's avatar Nicolas Michon
Browse files

Use exported variable from ms2 for plugins installation

parent 59c5f44d
......@@ -53,20 +53,16 @@ set(LIBS ${MEDIASTREAMER2_LIBRARIES} ${CODEC2_LIBRARIES} ${ORTP_LIBRARIES} ${BCT
set(SOURCE_FILES mscodec2.c)
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(mscodec2-static STATIC ${SOURCE_FILES})
set_target_properties(mscodec2-static PROPERTIES OUTPUT_NAME mscodec2)
target_link_libraries(mscodec2-static ${LIBS})
install(TARGETS mscodec2-static
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}"
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
......@@ -96,9 +92,9 @@ if(ENABLE_SHARED)
set_target_properties(mscodec2 PROPERTIES PREFIX "lib")
endif()
install(TARGETS mscodec2
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