非windows平台,才忽略静态库链接顺序

This commit is contained in:
xiongziliang 2021-04-11 11:44:16 +08:00
parent bbe67e928e
commit 5fadd2665d

View File

@ -48,4 +48,8 @@ else()
install(TARGETS MediaServer DESTINATION ${INSTALL_PATH_EXECUTABLE}) install(TARGETS MediaServer DESTINATION ${INSTALL_PATH_EXECUTABLE})
endif() endif()
if (WIN32)
target_link_libraries(MediaServer jsoncpp ${LINK_LIB_LIST})
else ()
target_link_libraries(MediaServer -Wl,--start-group jsoncpp ${LINK_LIB_LIST} -Wl,--end-group) target_link_libraries(MediaServer -Wl,--start-group jsoncpp ${LINK_LIB_LIST} -Wl,--end-group)
endif ()