cmake: misc fixes and cleanups
- Windows libraries (DLLs) are runtime. Set RUNTIME_OUTPUT_DIRECTORY,
in order for Windows to pick up the DLL when running gl_basic_test.
- gl_basic_test - add OUTPUT_DIRECTORY otherwise we end up with missing
DLL and cannot run it.
- Execute the target rather than constructing the path/binary name, drop
unneeded DEPENDS as well.
- Use target_link_libraries over depreciated link_libraries.
With these changes 'make check' and 'make check-func' no longer blows up
for Windows platforms and it even passes everything but
test_wcore_error_thread_local.
The test most likely fails as we create a new thread rather than fork()
the process. The latter does not have any straight-forward equivalent
and most of the current implementations use undocumented Win32 API.
v2: Rebase.
v3: Fix typos in cmake comment. Spotted by Chad.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>