Chore(lib): add lib for build PLUGIN
This commit is contained in:
2 files changed
+13
-3
No files matched your search
@@ -55,3 +55,7 @@ desktop.ini
|
||||
|
||||
# Freebuff
|
||||
.freebuff/
|
||||
|
||||
# Local, unversioned plugin experiments
|
||||
local-plugins/
|
||||
*.fwspacm
|
||||
+9
-3
@@ -89,6 +89,12 @@ set(HEADERS
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
|
||||
|
||||
# External addons are shared libraries resolved against the running executable,
|
||||
# so its symbols have to be in the dynamic symbol table (ENABLE_EXPORTS adds
|
||||
# -rdynamic). Without it a plugin can implement the IPlugin contract but cannot
|
||||
# call back into AppCore or the pages, which is what a UI addon needs to act.
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
include pages pages/base pages/packages pages/overview pages/system pages/extensions include/sdk logging preferences history archive update plugins providers core app)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Widgets Qt6::Network ZLIB::ZLIB)
|
||||
@@ -307,7 +313,7 @@ option(FWS_BUILD_AUR_PLUGIN "Build the AUR provider plugin" ON)
|
||||
option(FWS_BUILD_EXAMPLE_PLUGIN "Build the example external provider plugin" OFF)
|
||||
|
||||
# Optional example addon plugin: a non-provider extension (see
|
||||
# plugins/example-addon) proving that plugins can be anything written in C++,
|
||||
# providers/example-addon) proving that plugins can be anything written in C++,
|
||||
# not just package managers. Built next to the executable like any external
|
||||
# plugin.
|
||||
option(FWS_BUILD_EXAMPLE_ADDON "Build the example addon plugin" OFF)
|
||||
@@ -343,7 +349,7 @@ if(FWS_BUILD_AUR_PLUGIN)
|
||||
endif()
|
||||
|
||||
if(FWS_BUILD_EXAMPLE_PLUGIN)
|
||||
add_library(example-provider-plugin MODULE plugins/example-provider/example-provider.cpp)
|
||||
add_library(example-provider-plugin MODULE providers/example-provider/example-provider.cpp)
|
||||
target_include_directories(example-provider-plugin PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
|
||||
set_target_properties(example-provider-plugin PROPERTIES
|
||||
OUTPUT_NAME "sample-provider"
|
||||
@@ -356,7 +362,7 @@ if(FWS_BUILD_EXAMPLE_PLUGIN)
|
||||
endif()
|
||||
|
||||
if(FWS_BUILD_EXAMPLE_ADDON)
|
||||
add_library(example-addon-plugin MODULE plugins/example-addon/example-addon.cpp)
|
||||
add_library(example-addon-plugin MODULE providers/example-addon/example-addon.cpp)
|
||||
target_include_directories(example-addon-plugin PRIVATE include include/sdk logging preferences history archive update plugins providers core app)
|
||||
# The demo addon attaches Qt widgets, so it links the widget module like
|
||||
# the host application.
|
||||
|
||||
Reference in new issue
Block a user