Skip to content

Commit

Permalink
CMake: make get_link_libraries() not crash when there are no linked l…
Browse files Browse the repository at this point in the history
…ibraries at all
  • Loading branch information
bk138 committed Aug 10, 2018
1 parent 474f64e commit 79516a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 79516a6

Please sign in to comment.