Commit dc37a9a0 authored by Ghislain MARY's avatar Ghislain MARY

Allow build of libmsbcg729 statically with CMake.

parent 6ca907ef
......@@ -27,9 +27,12 @@ set(SOURCE_FILES
include_directories(${MEDIASTREAMER2_INCLUDE_DIRS})
add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0)
if(MSVC)
if(ENABLE_STATIC)
add_library(msbcg729 STATIC ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
else()
add_library(msbcg729 SHARED ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES VERSION ${PACKAGE_VERSION} SOVERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libmsbcg729.pdb
DESTINATION bin
......@@ -37,6 +40,7 @@ if(MSVC)
)
endif()
set_target_properties(msbcg729 PROPERTIES PREFIX "lib")
endif()
endif()
target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES})
......@@ -46,3 +50,4 @@ install(TARGETS msbcg729
ARCHIVE DESTINATION lib/mediastreamer/plugins
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