Commit dc37a9a0 authored by Ghislain MARY's avatar Ghislain MARY

Allow build of libmsbcg729 statically with CMake.

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