Why this code does not produce anything?
link_directories(${CMAKE_SOURCE_DIR}/libs/mylib1)
message("DIR: ${LINK_DIRECTORIES}")
I have problem on Windows that though I do link_directories() there is NO -L... flag when linking. I do create target after link_directories command as documentation suggests.
Because LINK_DIRECTORIES is not variable, but a directory property. You can obtain it in such way:
See documentation.