Commit ccc138ad authored by Ghislain MARY's avatar Ghislain MARY

Do not build libbcg729 but only libmsbcg729 when ENABLE_MSPLUGIN is true.

parent 20614c1e
......@@ -49,39 +49,40 @@ set(BCG729_SOURCE_FILES
vad.c
)
add_library(bcg729-objects OBJECT ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(NOT ENABLE_MSPLUGIN)
if(ENABLE_STATIC)
add_library(bcg729-static STATIC ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-static PROPERTIES OUTPUT_NAME bcg729)
install(TARGETS bcg729-static EXPORT Bcg729Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
if(ENABLE_SHARED)
add_library(bcg729 SHARED ${BCG729_SOURCE_FILES})
set_target_properties(bcg729 PROPERTIES VERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if(ENABLE_STATIC)
add_library(bcg729-static STATIC ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-static PROPERTIES OUTPUT_NAME bcg729)
install(TARGETS bcg729-static EXPORT Bcg729Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
if(ENABLE_SHARED)
add_library(bcg729 SHARED ${BCG729_SOURCE_FILES})
set_target_properties(bcg729 PROPERTIES VERSION 0)
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/libbcg729.pdb
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
set_target_properties(bcg729 PROPERTIES PREFIX "lib")
endif()
set_target_properties(bcg729 PROPERTIES PREFIX "lib")
install(TARGETS bcg729 EXPORT Bcg729Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
install(TARGETS bcg729 EXPORT Bcg729Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
set(ABS_BCG729_SOURCE_FILES )
foreach(elem ${BCG729_SOURCE_FILES})
list(APPEND ABS_BCG729_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${elem}")
endforeach()
set(BCG729_SOURCE_FILES ${ABS_BCG729_SOURCE_FILES} PARENT_SCOPE)
set(ABS_BCG729_SOURCE_FILES )
foreach(elem ${BCG729_SOURCE_FILES})
list(APPEND ABS_BCG729_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${elem}")
endforeach()
set(BCG729_SOURCE_FILES ${ABS_BCG729_SOURCE_FILES} PARENT_SCOPE)
endif()
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