Added link_directories() to wdk_add_driver() function #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey,
Please review this PR.
The main purpose of it is to allow users to use
target_link_libraries()
the same way they would when linking any other library/executable in cmake.Meaning I added
${WDK_ROOT}/Lib/${WDK_VERSION}/km/${WDK_PLATFORM}
to wdk_add_driver()'s library search path so that users only have to do for example:instead of
in their
CMakeLists.txt
, which is something novice user would never figure out.BTW if you think that adding
${WDK_ROOT}/Lib/${WDK_VERSION}/km/${WDK_PLATFORM}
tolink_directories()
the way I did is going to pollute cmake's default library search path, then it isn't.I don't have an exact explanation as to why, but it seems as if everything in
FindWdk.cmake
is processed in an separate sub-shell and discarded after success/failure.If you like it then we could add a test case for this as well.