Should I use
INCLUDE_DIRECTORIES(
.
)
or
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
)
What is the difference, if any? I've seen mostly "." in existing code, but searching for a dot on the Internet is kind of difficult ...
Both uses generate nearly the same output, since CMake tracks the current directory and replaces the occurrence of "." with "${CMAKE_CURRENT_SOURCE_DIR}/.". The only difference is that the "." variant has the extra path component "/." appended.
Whichever you choose is a matter of taste here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With