1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

Add SHARED_LIB option to add_tomahawk_plugin cmake macro

Usually plugins are built as modules in cmake, but for certain plugins
we need the possibility to link against them which is only possible with
shared libs
This commit is contained in:
Dominik Schmidt
2012-11-11 00:04:13 +01:00
parent dd1418f1a3
commit 2d8abe99f7

View File

@@ -41,7 +41,7 @@ ENDMACRO(CDR)
macro(add_tomahawk_plugin)
parse_arguments(PLUGIN
"SOURCES;UI;LINK_LIBRARIES;TYPE;EXPORT_MACRO;COMPILE_DEFINITIONS"
"NO_INSTALL"
"NO_INSTALL;SHARED_LIB"
${ARGN}
)
car(PLUGIN_NAME ${PLUGIN_DEFAULT_ARGS})
@@ -70,7 +70,11 @@ macro(add_tomahawk_plugin)
endif()
# add target
add_library(${target} MODULE ${PLUGIN_SOURCES})
if(NOT ${PLUGIN_SHARED_LIB})
add_library(${target} MODULE ${PLUGIN_SOURCES})
else()
add_library(${target} SHARED ${PLUGIN_SOURCES})
endif()
# add qt modules
qt5_use_modules(${target} Core Network Widgets Sql Xml DBus)