diff options
author | CHris B <cb@shoutr.net> | 2017-01-28 17:00:07 +0100 |
---|---|---|
committer | CHris B <cb@shoutr.net> | 2017-01-28 17:00:07 +0100 |
commit | d08fd0182da1ea861ef399a115efd85b698d65d0 (patch) | |
tree | 07508a11ace8e10889396187815d2b1c1c24a2d3 /CMakeLists.txt | |
parent | 6aa41e11a0f66f46d461cd57a43578cb329b128c (diff) | |
download | libtdevnc-d08fd0182da1ea861ef399a115efd85b698d65d0.tar.gz libtdevnc-d08fd0182da1ea861ef399a115efd85b698d65d0.zip |
CMake: do not include NOTFOUND libs in pkg-config snippets
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d2f159a..e658976 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -465,6 +465,9 @@ function(get_link_libraries OUT TARGET) set(RESULT "") get_target_property(LIBRARIES ${TARGET} INTERFACE_LINK_LIBRARIES) foreach(LIB ${LIBRARIES}) + if("${LIB}" MATCHES ".*NOTFOUND.*") + continue() + endif() string(REGEX REPLACE "^.*/lib" "" LIB ${LIB}) # remove leading path and "lib" name prefix string(REGEX REPLACE "-l" "" LIB ${LIB}) # remove leading -l string(REGEX REPLACE "\\.so$" "" LIB ${LIB}) # remove trailing .so |