From f5ae5fa799fd6f2f25c244d2342802b6acb24e95 Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Sat, 9 Jan 2016 01:36:42 +0000 Subject: MSVC+CMake: avoid get_target_property. #4004 When using the Visual Studio generator don't use get_target_property for custom command, because it returns unexpanded VS variables (e.g. $(Configuration)) within the result as part of the LOCATION path. The single case where this is a problem is for getting the output path for nvim-test, instead we use a path here. --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74130debf3..84e824bd6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -426,7 +426,11 @@ if(BUSTED_PRG) if(POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() - get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION) + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll) + else() + get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION) + endif() configure_file( test/config/paths.lua.in -- cgit