Fix LLDB search order
authorMikhail I. Krivtsov <m.krivtsov@samsung.com>
Wed, 6 Jul 2016 11:37:39 +0000 (14:37 +0300)
committerMikhail I. Krivtsov <m.krivtsov@samsung.com>
Wed, 6 Jul 2016 11:48:15 +0000 (14:48 +0300)
commit0f831773ec5113625518e9dcb4c188c8cec240c7
treebd70d3a1ed349db8d45e77d27e4244115b2134f1
parentba6118d68b9e09ccab5b7c47db4b215edf999773
Fix LLDB search order

By default 'find_library' without 'NO_DEFAULT_PATH' keyword searches
first in default locations specified by '${CMAKE_SYSTEM_PREFIX_PATH}'
and only then in locations specified via 'PATHS' keyword
('${WITH_LLDB_LIBS}' in our case). As result it always picks-up default
LLDB ignoring the one explicitly specified via '${WITH_LLDB_LIBS}'.
This change modifies search order giving priority to '${WITH_LLDB_LIBS}'
and '${WITH_LLDB_INCLUDES}' over default locations.

Commit migrated from https://github.com/dotnet/coreclr/commit/c1b65bdc225386e4f2af4c49512fbb93579c0973
src/coreclr/src/ToolBox/SOS/lldbplugin/CMakeLists.txt