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