只有linux平台打开链接顺序无关选项

This commit is contained in:
xiongziliang 2021-04-11 11:53:05 +08:00
parent 5fadd2665d
commit 9e93561c77

View File

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