mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-06-04 23:14:56 +02:00
Install plugins to lib/ even if they are shared libs
This commit is contained in:
parent
0d6b0fc6a9
commit
ddf6f3d3e1
@ -4,7 +4,7 @@ function(tomahawk_add_library)
|
||||
# parse arguments (name needs to be saved before passing ARGN into the macro)
|
||||
set(NAME ${ARGV0})
|
||||
set(options NO_INSTALL NO_VERSION)
|
||||
set(oneValueArgs NAME TYPE EXPORT_MACRO TARGET TARGET_TYPE EXPORT VERSION SOVERSION)
|
||||
set(oneValueArgs NAME TYPE EXPORT_MACRO TARGET TARGET_TYPE EXPORT VERSION SOVERSION INSTALL_BINDIR)
|
||||
set(multiValueArgs SOURCES UI LINK_LIBRARIES COMPILE_DEFINITIONS)
|
||||
cmake_parse_arguments(LIBRARY "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
set(LIBRARY_NAME ${NAME})
|
||||
@ -84,19 +84,24 @@ function(tomahawk_add_library)
|
||||
set_target_properties(${target} PROPERTIES SOVERSION ${LIBRARY_SOVERSION})
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT LIBRARY_INSTALL_BINDIR)
|
||||
set(LIBRARY_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
|
||||
# make installation optional, maybe useful for dummy plugins one day
|
||||
if(NOT LIBRARY_NO_INSTALL)
|
||||
include(GNUInstallDirs)
|
||||
if(NOT LIBRARY_EXPORT)
|
||||
install( TARGETS ${target}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
RUNTIME DESTINATION ${LIBRARY_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
else()
|
||||
install( TARGETS ${target}
|
||||
EXPORT ${LIBRARY_EXPORT}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
RUNTIME DESTINATION ${LIBRARY_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
@ -49,5 +49,7 @@ function(tomahawk_add_plugin)
|
||||
|
||||
list(APPEND tomahawk_add_library_args "NO_VERSION")
|
||||
|
||||
list(APPEND tomahawk_add_library_args "INSTALL_BINDIR" "${CMAKE_INSTALL_LIBDIR}")
|
||||
|
||||
tomahawk_add_library(${tomahawk_add_library_args})
|
||||
endfunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user