[CMake] CMake target_link_libraries items should be quoted or not? Linux/Ubuntu 14.04 cmake 3.4.1

Normand Robert normand.robert at sri.utoronto.ca
Wed Dec 9 12:22:51 EST 2015


robert at kalymnos:~/Code/Debug/normandBuild$ cmake --version
cmake version 3.4.1

Reading docs trying to understand why my build works when I write

target_link_libraries(Debug ${VTK_LIBRARIES} -lsri-spatialfft 
-lsri-spatial -lsri-memory)

but not when everything is protected in quotes:

target_link_libraries(Debug "${VTK_LIBRARIES} -lsri-spatialfft 
-lsri-spatial -lsri-memory")

which causes an extra library which does not exist to be passed to the 
linker. Is this expected behaviour?

-- 
Normand Robert PhD
Sunnybrook Health Sciences Centre
Room S632, 2075 Bayview Avenue, Toronto, ON M4N 3M5



More information about the CMake mailing list