summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-05 21:46:27 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-05 21:46:27 +0200
commit5c292cad0a5ab0b3b73929f302a37a2e6394ef81 (patch)
tree926dc5b45c5629b117899f23fe7d4687fefe58ab
parent8815732f37c5899dbe65d507c082c0c62250ab7d (diff)
cmake: install shared libs only on win32
Issue: #867
-rw-r--r--cmake/opentrack-boilerplate.cmake26
-rw-r--r--cmake/opentrack-qt.cmake10
2 files changed, 18 insertions, 18 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()
diff --git a/cmake/opentrack-qt.cmake b/cmake/opentrack-qt.cmake
index fbea4d1c..30b3e7c7 100644
--- a/cmake/opentrack-qt.cmake
+++ b/cmake/opentrack-qt.cmake
@@ -8,12 +8,10 @@ find_package(Qt5 COMPONENTS SerialPort QUIET)
set(MY_QT_LIBS ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
function(otr_install_qt_libs)
- if(WIN32)
- foreach(i Qt5::Core Qt5::Gui Qt5::Network Qt5::SerialPort Qt5::Widgets)
- otr_install_lib(${i} ".")
- endforeach()
- otr_install_lib(Qt5::QWindowsIntegrationPlugin "./platforms")
- endif()
+ foreach(i Qt5::Core Qt5::Gui Qt5::Network Qt5::SerialPort Qt5::Widgets)
+ otr_install_lib(${i} ".")
+ endforeach()
+ otr_install_lib(Qt5::QWindowsIntegrationPlugin "./platforms")
endfunction()
otr_install_qt_libs()