mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
Add possibility to specify custom qt5 modules to a library
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 INSTALL_BINDIR)
|
set(oneValueArgs NAME TYPE EXPORT_MACRO TARGET TARGET_TYPE EXPORT VERSION SOVERSION INSTALL_BINDIR QT5_MODULES)
|
||||||
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})
|
||||||
@@ -46,8 +46,7 @@ function(tomahawk_add_library)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# HACK: add qt modules - every lib should define its own set of modules
|
# HACK: add qt modules - every lib should define its own set of modules
|
||||||
qt5_use_modules(${target} Core Network Widgets Sql Xml DBus)
|
qt5_use_modules(${target} Core Network Widgets Sql Xml DBus ${LIBRARY_QT5_MODULES})
|
||||||
|
|
||||||
|
|
||||||
# definitions - can this be moved into set_target_properties below?
|
# definitions - can this be moved into set_target_properties below?
|
||||||
add_definitions(${QT_DEFINITIONS})
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
@@ -21,6 +21,7 @@ list(APPEND ${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_UI
|
|||||||
tomahawk_add_library(${TOMAHAWK_WIDGETS_LIBRARY_TARGET}
|
tomahawk_add_library(${TOMAHAWK_WIDGETS_LIBRARY_TARGET}
|
||||||
SOURCES ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_SOURCES}
|
SOURCES ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_SOURCES}
|
||||||
UI ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_UI}
|
UI ${${TOMAHAWK_WIDGETS_LIBRARY_TARGET}_UI}
|
||||||
|
QT5_MODULES Concurrent
|
||||||
EXPORT TomahawkLibraryDepends
|
EXPORT TomahawkLibraryDepends
|
||||||
VERSION ${TOMAHAWK_VERSION_SHORT}
|
VERSION ${TOMAHAWK_VERSION_SHORT}
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user