diff options
author | Christian Beier <dontmind@freeshell.org> | 2018-08-10 17:09:35 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2018-08-10 17:09:35 +0200 |
commit | 79516a6aa3e875c8d9f4c83667076aa070fe5d6e (patch) | |
tree | 051e156593339d4e715395dc1fd51f0fddf4c880 /CMakeLists.txt | |
parent | 474f64e5db23ccd14b2a281b4076be081297d110 (diff) | |
download | libtdevnc-79516a6aa3e875c8d9f4c83667076aa070fe5d6e.tar.gz libtdevnc-79516a6aa3e875c8d9f4c83667076aa070fe5d6e.zip |
CMake: make get_link_libraries() not crash when there are no linked libraries at all
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 86038d5..a0f1537 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -617,7 +617,9 @@ function(get_link_libraries OUT TARGET) endforeach() list(REMOVE_DUPLICATES RESULT) string(CONCAT RESULT ${RESULT}) # back to string - string(REPLACE "-l" " -l" RESULT ${RESULT}) # re-add separators + if(RESULT) + string(REPLACE "-l" " -l" RESULT ${RESULT}) # re-add separators + endif(RESULT) set(${OUT} ${RESULT} PARENT_SCOPE) endfunction() |