From 809dd577ab80f6bd34fdb88b7e521f89c3c73cca Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 24 Apr 2019 20:35:18 +0200 Subject: cmake: allow install lib by path --- cmake/opentrack-boilerplate.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cmake') diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index b0fdf577..e7549ebc 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -258,9 +258,14 @@ endfunction() function(otr_install_lib target dest) if(WIN32) - get_property(path TARGET "${target}" PROPERTY "LOCATION_${CMAKE_BUILD_TYPE}") - if(path STREQUAL "") - get_property(path TARGET "${target}" PROPERTY "LOCATION") + string(FIND "${target}" "/" idx) + if(idx EQUAL -1) + get_property(path TARGET "${target}" PROPERTY "LOCATION_${CMAKE_BUILD_TYPE}") + if(path STREQUAL "") + get_property(path TARGET "${target}" PROPERTY "LOCATION") + endif() + else() + set(path "${target}") endif() if(path STREQUAL "") message(FATAL_ERROR "Can't find ${target}") -- cgit v1.2.3