Install runtime modules into bin directory

Runtime modules, such as executables and shared libraries should be
installed into "bin" instead of "lib".
This commit is contained in:
Maxim Biro 2017-02-16 05:11:19 -05:00
parent 5ef37e0b63
commit 54a1ccf8ce

View File

@ -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}")