Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Install plugins to lib/ even if they are shared libs

  • Loading branch information...
commit ddf6f3d3e1a8a4be6f75b80bf82adfbf5a4ba4db 1 parent 0d6b0fc
@dschmidt dschmidt authored
Showing with 10 additions and 3 deletions.
  1. +8 −3 TomahawkAddLibrary.cmake
  2. +2 −0  TomahawkAddPlugin.cmake
View
11 TomahawkAddLibrary.cmake
@@ -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}
)
View
2  TomahawkAddPlugin.cmake
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.