summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake26
1 files changed, 14 insertions, 12 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 5a4d7c71..d8b526c5 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -254,18 +254,20 @@ function(otr_pdb_for_dll varname path)
endfunction()
function(otr_install_lib target dest)
- get_property(path TARGET "${target}" PROPERTY "LOCATION_${CMAKE_BUILD_TYPE}")
- if(path STREQUAL "")
- get_property(path TARGET "${target}" PROPERTY "LOCATION")
- endif()
- if(path STREQUAL "")
- message(FATAL_ERROR "Can't find ${target}")
- endif()
- string(TOLOWER "${path}" path_)
- if(NOT path_ MATCHES "\\.(a|lib)$")
- if(MSVC AND opentrack_install-debug-info)
- otr_pdb_for_dll(pdb-path "${opentrack-hier-debug}")
+ if(WIN32)
+ get_property(path TARGET "${target}" PROPERTY "LOCATION_${CMAKE_BUILD_TYPE}")
+ if(path STREQUAL "")
+ get_property(path TARGET "${target}" PROPERTY "LOCATION")
+ endif()
+ if(path STREQUAL "")
+ message(FATAL_ERROR "Can't find ${target}")
+ endif()
+ string(TOLOWER "${path}" path_)
+ if(NOT path_ MATCHES "\\.(a|lib)$")
+ if(MSVC AND opentrack_install-debug-info)
+ otr_pdb_for_dll(pdb-path "${opentrack-hier-debug}")
+ endif()
+ install(FILES "${path}" DESTINATION "${dest}")
endif()
- install(FILES "${path}" DESTINATION "${dest}")
endif()
endfunction()