From a097148feeb46a612c594e77a7a1b620aae2f851 Mon Sep 17 00:00:00 2001 From: quassel Date: Fri, 13 Mar 2009 15:44:07 +0000 Subject: [PATCH] Handle empty LINK_EXTRA --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dbafc334..6a2cf835 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,8 +79,10 @@ endif(WIN32) # Define a comma-separated list here # e.g. for pgsql, we need -DLINK_EXTRA=pq;crypt set(LINK_EXTRA "" CACHE STRING "Semicolon-separated list of libraries to be linked") -string(REPLACE "," ";" LINK_EXTRA ${LINK_EXTRA}) -link_libraries(${LINK_EXTRA}) +if(LINK_EXTRA) + string(REPLACE "," ";" LINK_EXTRA ${LINK_EXTRA}) + link_libraries(${LINK_EXTRA}) +endif(LINK_EXTRA) # Build Type # We need to make sure it's not empty -- 2.20.1