Commit 4edc094b authored by Ghislain MARY's avatar Ghislain MARY

Do not use object library when building with CMake.

parent d989835b
......@@ -27,11 +27,8 @@ set(SOURCE_FILES
include_directories(${MEDIASTREAMER2_INCLUDE_DIRS})
add_library(msbcg729-objects OBJECT ${SOURCE_FILES})
set_target_properties(msbcg729-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(ENABLE_STATIC)
add_library(msbcg729-static STATIC $<TARGET_OBJECTS:bcg729-objects> $<TARGET_OBJECTS:msbcg729-objects>)
add_library(msbcg729-static STATIC ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729-static PROPERTIES OUTPUT_NAME msbcg729)
target_link_libraries(msbcg729-static ${MEDIASTREAMER2_LIBRARIES})
install(TARGETS msbcg729-static
......@@ -40,7 +37,7 @@ if(ENABLE_STATIC)
)
endif()
if(ENABLE_SHARED)
add_library(msbcg729 MODULE $<TARGET_OBJECTS:bcg729-objects> $<TARGET_OBJECTS:msbcg729-objects>)
add_library(msbcg729 MODULE ${BCG729_SOURCE_FILES} ${SOURCE_FILES})
set_target_properties(msbcg729 PROPERTIES SOVERSION 0)
target_link_libraries(msbcg729 ${MEDIASTREAMER2_LIBRARIES})
if(MSVC)
......
......@@ -50,7 +50,7 @@ add_library(bcg729-objects OBJECT ${BCG729_SOURCE_FILES})
set_target_properties(bcg729-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(ENABLE_STATIC)
add_library(bcg729-static STATIC $<TARGET_OBJECTS:bcg729-objects>)
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}
......@@ -76,3 +76,9 @@ if(ENABLE_SHARED)
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)
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