Handle empty LINK_EXTRA
authorquassel <quassel@graviton.(none)>
Fri, 13 Mar 2009 15:44:07 +0000 (15:44 +0000)
committerquassel <quassel@graviton.(none)>
Fri, 13 Mar 2009 15:44:07 +0000 (15:44 +0000)
CMakeLists.txt

index dbafc33..6a2cf83 100644 (file)
@@ -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")
 # 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
 
 # Build Type
 # We need to make sure it's not empty