diff options
-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}") |