From 54a1ccf8cec39bfa7019659afef3db5e192fb4a8 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Thu, 16 Feb 2017 05:11:19 -0500 Subject: [PATCH] Install runtime modules into bin directory Runtime modules, such as executables and shared libraries should be installed into "bin" instead of "lib". --- cmake/ModulePackage.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake index 245e41eb..8ee8d6d7 100644 --- a/cmake/ModulePackage.cmake +++ b/cmake/ModulePackage.cmake @@ -65,10 +65,16 @@ function(install_module lib) VERSION ${SOVERSION} SOVERSION ${SOVERSION_MAJOR} ) - install(TARGETS ${lib}_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS ${lib}_shared + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() if(ENABLE_STATIC) - install(TARGETS ${lib}_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(TARGETS ${lib}_static + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() string(REPLACE ";" " " ${lib}_PKGCONFIG_LIBS "${${lib}_PKGCONFIG_LIBS}")