blob: 6fb3b0caa49bbac3dd140fb638f884d34c4dde81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29a89939..5c5f4e5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -332,10 +332,14 @@ set_variable_from_rel_or_absolute_path("includedir" "\\\${prefix}" "${CMAKE_INST
function(get_pkgconfig_deps NAME OUT)
get_target_property(link_libs ${NAME} LINK_LIBRARIES)
if(NOT link_libs STREQUAL "link_libs-NOTFOUND")
- foreach(lib ${link_libs})
- # omit -lopenjp2 from Libs.private because libopenjp2 is in Requires
- if(NOT ${lib} STREQUAL ${OPENJPEG_LIBRARY_NAME})
- string(APPEND deps "-l${lib} ")
+ # omit openjp2 from Libs.private because libopenjp2 is in Requires
+ list(REMOVE_ITEM link_libs "${OPENJPEG_LIBRARY_NAME}")
+ set(deps "")
+ foreach(item IN LISTS link_libs)
+ if(item STREQUAL "-pthread" OR item STREQUAL "-lpthread")
+ string(APPEND deps " ${item}")
+ else()
+ string(APPEND deps " -l${item}")
endif()
endforeach()
endif()
|