I created the sample DLL library following the tutorial by Microsoft. I decided to create an example project using CMake, using the property target_link_libraries
as I attempted to observe it being populated by CMake.
Within my example, I can see that the value Additional include directories
is correctly set and is it hardcoded to an absolute path in my local machine to find the header files.
Additionally the additional dependencies
is being correctly set to find the .lib
file. However this one seems to be a relative path instead of an absolute path like the include directories did.
My confusion comes from the value of Additional Library Directories
. This is set to %(AdditionalLibraryDirectories)
. From the tutorial, this should be the directory to search for the .lib
file. Actually typing this out, I just realized that in the tutorial it simply lists the file, MathLibrary.lib
in the field Additional dependencies
. It simply lists the file, but lists the place to find it in the field Additonal Library Directories
. But, using CMake, inside the field Additional Dependencies
, it lists the file relative to somewhere. Is it the value of %(AdditionalLibraryDirectories)
used here by CMake, or does Additional Dependencies
accept both a single file (to be searched) or a file path?