File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -332,10 +332,14 @@ set_variable_from_rel_or_absolute_path("includedir" "\\\${prefix}" "${CMAKE_INST
332332function (get_pkgconfig_deps NAME OUT)
333333 get_target_property (link_libs ${NAME} LINK_LIBRARIES )
334334 if (NOT link_libs STREQUAL "link_libs-NOTFOUND" )
335- foreach (lib ${link_libs} )
336- # omit -lopenjp2 from Libs.private because libopenjp2 is in Requires
337- if (NOT ${lib} STREQUAL ${OPENJPEG_LIBRARY_NAME} )
338- string (APPEND deps "-l${lib} " )
335+ # omit openjp2 from Libs.private because libopenjp2 is in Requires
336+ list (REMOVE_ITEM link_libs "${OPENJPEG_LIBRARY_NAME} " )
337+ set (deps "" )
338+ foreach (item IN LISTS link_libs)
339+ if (item STREQUAL "-pthread" OR item STREQUAL "-lpthread" )
340+ string (APPEND deps " ${item} " )
341+ else ()
342+ string (APPEND deps " -l${item} " )
339343 endif ()
340344 endforeach ()
341345 endif ()
You can’t perform that action at this time.
0 commit comments