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.
This commit is contained in:
Rui Abreu Ferreira 2016-01-09 01:36:42 +00:00 committed by Justin M. Keyes
parent 3875d0bdf6
commit f5ae5fa799

View File

@ -426,7 +426,11 @@ if(BUSTED_PRG)
if(POLICY CMP0026) if(POLICY CMP0026)
cmake_policy(SET CMP0026 OLD) cmake_policy(SET CMP0026 OLD)
endif() endif()
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) get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
endif()
configure_file( configure_file(
test/config/paths.lua.in test/config/paths.lua.in