I set the CFLAGS in CMake by CMAKE_C_FLAGS. Is something like this to set LDFLAGS?
You can specify linker flags in target_link_libraries.