diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-24 20:35:18 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-04-24 20:35:18 +0200 |
commit | 809dd577ab80f6bd34fdb88b7e521f89c3c73cca (patch) | |
tree | 7fa8315bd0b1bafa231f799da1d51ade982707a5 /cmake/opentrack-boilerplate.cmake | |
parent | b178d5428c30574cf648c037897242071eaf167e (diff) |
cmake: allow install lib by path
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 11 |
1 files changed, 8 insertions, 3 deletions
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}") |