Commit 629f639c authored by Ghislain MARY's avatar Ghislain MARY

Do not use object library when building with CMake.

parent f360bded
......@@ -35,11 +35,8 @@ if(ENABLE_DECODER)
add_definitions(-DOPENH264_DECODER_ENABLED)
endif()
add_library(msopenh264-objects OBJECT ${SOURCE_FILES})
set_target_properties(msopenh264-objects PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(ENABLE_STATIC)
add_library(msopenh264-static STATIC $<TARGET_OBJECTS:msopenh264-objects>)
add_library(msopenh264-static STATIC ${SOURCE_FILES})
set_target_properties(msopenh264-static PROPERTIES OUTPUT_NAME msopenh264)
target_link_libraries(msopenh264-static ${LIBS})
install(TARGETS msopenh264-static
......@@ -48,7 +45,7 @@ if(ENABLE_STATIC)
)
endif()
if(ENABLE_SHARED)
add_library(msopenh264 MODULE $<TARGET_OBJECTS:msopenh264-objects>)
add_library(msopenh264 MODULE ${SOURCE_FILES})
set_target_properties(msopenh264 PROPERTIES SOVERSION 0)
target_link_libraries(msopenh264 ${LIBS})
if(MSVC)
......
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