diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2016-01-09 01:36:42 +0000 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-17 22:59:55 -0500 |
commit | f5ae5fa799fd6f2f25c244d2342802b6acb24e95 (patch) | |
tree | df603d546fbbe918ce890c9eee4d3abfeed9bcba | |
parent | 3875d0bdf69d775c39a85d295b82a0f20f3c5596 (diff) | |
download | rneovim-f5ae5fa799fd6f2f25c244d2342802b6acb24e95.tar.gz rneovim-f5ae5fa799fd6f2f25c244d2342802b6acb24e95.tar.bz2 rneovim-f5ae5fa799fd6f2f25c244d2342802b6acb24e95.zip |
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.
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
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 |