Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ MESSAGE(STATUS "Backend FEEDBIN: " ${FEEDBIN})
MESSAGE(STATUS "Backend FEEDHQ: " ${FEEDHQ})
MESSAGE(STATUS "Backend BAZQUX: " ${FEEDHQ})

add_subdirectory(test)

if(TTRSS)
add_subdirectory(ttrss)
Expand Down
2 changes: 1 addition & 1 deletion plugins/backend/bazqux/bazquxInterface.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class FeedReader.bazquxInterface : Peas.ExtensionBase, FeedServerInterfac
private DataBaseReadOnly m_db;
private DataBase m_db_write;

public void init(GLib.SettingsBackend settings_backend, Secret.Collection secrets, DataBaseReadOnly db, DataBase db_write)
public void init(GLib.SettingsBackend settings_backend, Secret.Collection secrets, DataBaseReadOnly db, DataBase db_write, string? host = null)
{
m_db = db;
m_db_write = db_write;
Expand Down
2 changes: 1 addition & 1 deletion plugins/backend/demo/demoInterface.vala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class FeedReader.demoInterface : Peas.ExtensionBase, FeedServerInterface
// This method gets executed right after the plugin is loaded. Do everything
// you need to set up the plugin here.
//--------------------------------------------------------------------------------------
public void init(GLib.SettingsBackend settings_backend, Secret.Collection secrets, DataBaseReadOnly db, DataBase db_write)
public void init(GLib.SettingsBackend settings_backend, Secret.Collection secrets, DataBaseReadOnly db, DataBase db_write, string? host = null)
{

}
Expand Down
52 changes: 19 additions & 33 deletions plugins/backend/feedbin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,20 @@
set (PLUGNAME feedbin)
set (PLUGTARGET ${PLUGNAME}_target)

set (API_NAME ${PLUGNAME}API)
set (API_TARGET ${API_NAME}_target)

set (TEST_NAME ${PLUGNAME}_test)
set (TEST_TARGET ${TEST_NAME}_target)

# ----------------------------------------------------------
# Feedbin API Library
# ----------------------------------------------------------

vala_precompile(VALA_C ${API_TARGET}
feedbinAPI.vala

GENERATE_VAPI
feedbinAPI

PACKAGES
json-glib-1.0
libsoup-2.4
gee-0.8

OPTIONS
--target-glib=2.32
--library ${API_NAME}
)

add_library(${API_NAME} STATIC ${VALA_C})
set_property(TARGET ${API_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)

# ----------------------------------------------------------
# Feedbin Plugin
# ----------------------------------------------------------

vala_precompile(VALA_C ${PLUGTARGET}
feedbinAPI.vala
feedbinInterface.vala
feedbinUtils.vala

GENERATE_VAPI FeedbinPlugin

PACKAGES
libpeas-1.0
gtk+-3.0
Expand All @@ -54,44 +31,53 @@ OPTIONS

CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/FeedReader.vapi
${CMAKE_BINARY_DIR}/plugins/backend/feedbin/feedbinAPI.vapi
${CMAKE_SOURCE_DIR}/vapi/gd-1.0.vapi
${CMAKE_SOURCE_DIR}/vapi/webkit2gtk-4.0.vapi
)

GLIB_COMPILE_RESOURCES(GRESOURCES SOURCE ${PLUGNAME}.gresource.xml)

add_library(${PLUGNAME} SHARED ${VALA_C} ${GRESOURCES})
target_link_libraries(${PLUGNAME} ${API_NAME})

# ----------------------------------------------------------

add_dependencies(${PLUGNAME} ${UI_NAME} ${FEEDREADER_NAME})
add_dependencies(${PLUGNAME} ${FEEDREADER_NAME})
add_schema("org.gnome.feedreader.${PLUGNAME}.gschema.xml")

install(TARGETS ${PLUGNAME} DESTINATION ${PKGLIBDIR}/plugins)
install(FILES ${PLUGNAME}.plugin DESTINATION ${PKGLIBDIR}/plugins)

# ----------------------------------------------------------
# Tests
# ----------------------------------------------------------

install(TARGETS ${PLUGNAME} DESTINATION ${PKGLIBDIR}/plugins)
install(FILES ${PLUGNAME}.plugin DESTINATION ${PKGLIBDIR}/plugins)
vala_precompile(VALA_C ${TEST_TARGET}
TestFeedbin.vala

PACKAGES
libpeas-1.0
gtk+-3.0
json-glib-1.0
libsoup-2.4
gee-0.8
libxml-2.0
sqlite3
libsecret-1

OPTIONS
--includedir=${CMAKE_BINARY_DIR}/plugins/backend/test/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This didn't help..

--target-glib=2.32
--disable-warnings # since we frequently want to not catch errors

CUSTOM_VAPIS
${CMAKE_BINARY_DIR}/plugins/backend/feedbin/feedbinAPI.vapi
${CMAKE_BINARY_DIR}/FeedReader.vapi
${CMAKE_BINARY_DIR}/plugins/backend/feedbin/FeedbinPlugin.vapi
${CMAKE_BINARY_DIR}/plugins/backend/test/TestPlugin.vapi
${CMAKE_SOURCE_DIR}/vapi/gd-1.0.vapi
${CMAKE_SOURCE_DIR}/vapi/webkit2gtk-4.0.vapi
)

add_executable(${TEST_NAME} ${VALA_C})
target_link_libraries(${TEST_NAME} ${API_NAME})
target_link_libraries(${TEST_NAME} ${PLUGNAME} TestPlugin)

add_test(${PLUGNAME} gtester -k -o ${CMAKE_BINARY_DIR}/${PLUGNAME}.gtester.log ${TEST_NAME})
Loading