summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2018-09-07 13:28:10 +0200
committerGitHub <noreply@github.com>2018-09-07 13:28:10 +0200
commit2e94e9866b42e2ccf7cd0fa7677b7ecb11de151f (patch)
treed5bc1120874de4bb1bd8c9591737c1de1bf1924c /extensions
parentadeb99a063e2364e137e78968276de1860101d98 (diff)
downloadmidori-git-2e94e9866b42e2ccf7cd0fa7677b7ecb11de151f.tar.gz
More fine-grained Activatable interfaces (#42)
* `Plugins.plug` now takes a type and property, consumer connects signals. * Generation of a GIR file. * Preparation for built-in extensions in `extensions` folder. * Tweaks to `Database` to avoid exposing `Sqlite` namespace in public API. Note: Avoiding `owned get; construct;` with `Activatable` interfaces as used in the definition of `Peas.Activatable` because it triggers a lot of internal compiler assertions at build time. Fixes: #35
Diffstat (limited to 'extensions')
-rw-r--r--extensions/CMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt
new file mode 100644
index 00000000..aec67acb
--- /dev/null
+++ b/extensions/CMakeLists.txt
@@ -0,0 +1,52 @@
+# Copyright (C) 2013-2018 Christian Dywan <christian@twotoasts.de>
+
+set(EXTENSIONDIR "${CMAKE_INSTALL_FULL_LIBDIR}/${CMAKE_PROJECT_NAME}")
+include_directories(
+ "${CMAKE_SOURCE_DIR}"
+ "${CMAKE_SOURCE_DIR}/core"
+ ${DEPS_INCLUDE_DIRS}
+ ${DEPS_GTK_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}
+ "${CMAKE_BINARY_DIR}/core"
+ )
+file(GLOB EXTENSIONS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c *.vala)
+foreach(UNIT_SRC ${EXTENSIONS})
+ if (${UNIT_SRC} MATCHES "(.vala)$")
+ string(REPLACE ".vala" "" UNIT ${UNIT_SRC})
+ include(ValaPrecompile)
+ vala_precompile(UNIT_SRC_C ${UNIT}
+ ${UNIT_SRC}
+ PACKAGES
+ ${PKGS}
+ OPTIONS
+ ${VALAFLAGS}
+ CUSTOM_VAPIS
+ ${CMAKE_BINARY_DIR}/core/${LIBCORE}.vapi
+ ${EXTRA_VAPIS}
+ )
+
+ add_library(${UNIT} MODULE ${UNIT_SRC_C})
+ set_target_properties(${UNIT} PROPERTIES
+ COMPILE_FLAGS "${VALA_CFLAGS}"
+ )
+ else()
+ string(REPLACE ".c" "" UNIT ${UNIT_SRC})
+ add_library(${UNIT} MODULE ${UNIT_SRC})
+ set_target_properties(${UNIT} PROPERTIES
+ COMPILE_FLAGS ${CFLAGS}
+ )
+ endif()
+ target_link_libraries(${UNIT}
+ ${DEPS_LIBRARIES}
+ ${DEPS_GTK_LIBRARIES}
+ ${LIBCORE}
+ )
+ install(TARGETS ${UNIT}
+ LIBRARY DESTINATION ${EXTENSIONDIR}
+ )
+ set(MANIFEST "${UNIT}.plugin")
+ configure_file(${MANIFEST}.in ${MANIFEST})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANIFEST}
+ DESTINATION ${EXTENSIONDIR}
+ )
+endforeach ()