aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt70
-rw-r--r--data/CMakeLists.txt12
-rw-r--r--src/CMakeLists.txt127
-rw-r--r--tests/CMakeLists.txt156
-rw-r--r--tests/dummy-indicator-blank.c2
-rw-r--r--tests/dummy-indicator-entry-func.h4
-rw-r--r--tests/dummy-indicator-null.c4
-rw-r--r--tests/dummy-indicator-signaler.c4
-rw-r--r--tests/dummy-indicator-simple.c4
-rw-r--r--tests/dummy-indicator-visible.c4
-rw-r--r--tests/service-manager-connect-service.c2
-rw-r--r--tests/service-manager-connect.c2
-rw-r--r--tests/service-manager-no-connect.c2
-rw-r--r--tests/service-manager-nostart-connect.c2
-rw-r--r--tests/service-shutdown-timeout.c2
-rw-r--r--tests/service-version-bad-service.c2
-rw-r--r--tests/service-version-good-service.c2
-rw-r--r--tests/service-version-manager.c2
-rw-r--r--tests/service-version-multiwatch-manager-impolite.c2
-rw-r--r--tests/service-version-multiwatch-manager.c2
-rw-r--r--tests/service-version-multiwatch-service.c2
-rw-r--r--tests/test-desktop-shortcuts.c2
-rw-r--r--tests/test-indicator-ng.c2
-rw-r--r--tests/test-loader.c20
-rw-r--r--tools/CMakeLists.txt8
-rw-r--r--tools/indicator-loader.c4
26 files changed, 409 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..e580790
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,70 @@
+cmake_minimum_required(VERSION 3.13)
+project(libayatana-indicator C)
+
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+
+option(ENABLE_TESTS "Enable all tests and checks" OFF)
+option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF)
+
+if(ENABLE_COVERAGE)
+ set(ENABLE_TESTS ON)
+ set(CMAKE_BUILD_TYPE "Coverage")
+else()
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
+
+# Check for prerequisites
+
+set(DEPS glib-2.0>=2.58 gtk+-3.0>=3.24 libayatana-ido3-0.4>=0.8.2)
+
+find_package (PkgConfig REQUIRED)
+pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS})
+
+# Set global variables
+
+include(GNUInstallDirs)
+set(ABI_VERSION "7")
+set(API_VERSION "4")
+set(PROJECT_VERSION "0.8.4")
+set(PROJECT_NAME "libayatana-indicator")
+
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+
+ set(COMPILE_FLAGS "${COMPILE_FLAGS} -Weverything")
+ set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-c++98-compat -Wno-padded")
+ set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-documentation")
+
+else()
+
+ set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wall")
+
+endif()
+
+# Make everything
+
+add_subdirectory(src)
+add_subdirectory(data)
+
+if(ENABLE_TESTS)
+ include(CTest)
+ enable_testing()
+ add_subdirectory(tools)
+ add_subdirectory(tests)
+
+ if (ENABLE_COVERAGE)
+ find_package(CoverageReport)
+ ENABLE_COVERAGE_REPORT(
+ TARGETS "ayatana-indicator3"
+ TESTS "test-desktop-shortcuts" "test-indicator-ng" "test-loader"
+ FILTER /usr/include ${CMAKE_BINARY_DIR}/*
+ )
+ endif()
+
+endif()
+
+# Display config info
+
+message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
+message(STATUS "Unit tests: ${ENABLE_TESTS}")
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644
index 0000000..f6c71d9
--- /dev/null
+++ b/data/CMakeLists.txt
@@ -0,0 +1,12 @@
+# ayatana-indicator3-0.4.pc
+
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3-0.4.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.4.pc" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.4.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
+
+# ayatana-indicators.target
+
+pkg_check_modules(SYSTEMD systemd)
+
+if (${SYSTEMD_FOUND})
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicators.target" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/systemd/user")
+endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..d6c6647
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,127 @@
+# indicator-desktop-shortcuts.h
+# indicator-image-helper.h
+# indicator-ng.h
+# indicator-object.h
+# indicator-service-manager.h
+# indicator-service.h
+# indicator.h
+
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-desktop-shortcuts.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-image-helper.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-ng.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-object.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-service-manager.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator-service.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/indicator.h" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/libayatana-indicator3-0.4/libayatana-indicator")
+
+set(HEADERS
+ indicator.h
+ indicator-desktop-shortcuts.h
+ indicator-image-helper.h
+ indicator-object.h
+ indicator-service.h
+ indicator-service-manager.h
+ indicator-ng.h
+)
+
+set(SOURCES
+ gen-indicator-service.xml.c
+ indicator-desktop-shortcuts.c
+ indicator-image-helper.c
+ indicator-ng.c
+ indicator-object.c
+ indicator-object-enum-types.c
+ indicator-object-marshal.c
+ indicator-service.c
+ indicator-service-manager.c
+
+)
+
+# indicator-object-enum-types.h
+
+find_program(GLIB_MKENUMS glib-mkenums)
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.h"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND
+ ${GLIB_MKENUMS}
+ --template indicator-object-enum-types.h.template
+ ${HEADERS}
+ --output="${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.h"
+)
+
+# indicator-object-enum-types.c
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.c"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.h"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND
+ ${GLIB_MKENUMS}
+ --template indicator-object-enum-types.c.template
+ ${HEADERS}
+ --output="${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.c"
+)
+
+find_program(GLIB_GENMARSHAL glib-genmarshal)
+
+# indicator-object-marshal.h
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-marshal.h"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-enum-types.c"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND
+ ${GLIB_GENMARSHAL}
+ --prefix=_indicator_object_marshal
+ --header indicator-object-marshal.list
+ --quiet
+ --output="${CMAKE_CURRENT_BINARY_DIR}/indicator-object-marshal.h"
+)
+
+# indicator-object-marshal.c
+
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-marshal.c"
+ DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/indicator-object-marshal.h"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ COMMAND
+ ${GLIB_GENMARSHAL}
+ --prefix=_indicator_object_marshal
+ --body indicator-object-marshal.list
+ --include-header=indicator-object-marshal.h
+ --quiet
+ --output="${CMAKE_CURRENT_BINARY_DIR}/indicator-object-marshal.c"
+)
+
+add_custom_target("src-generated" DEPENDS "indicator-object-marshal.c")
+
+# gen-indicator-service.xml.h
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/gen-indicator-service.xml.h" "extern const char * _indicator_service;")
+
+# gen-indicator-service.xml.c
+
+file(READ "${CMAKE_CURRENT_SOURCE_DIR}/indicator-service.xml" GEN_INDICATOR_SERVICE_XML_C)
+string(REPLACE "\"" "\\\"" GEN_INDICATOR_SERVICE_XML_C ${GEN_INDICATOR_SERVICE_XML_C})
+string(REPLACE "\n" "\\n\"\n\"" GEN_INDICATOR_SERVICE_XML_C ${GEN_INDICATOR_SERVICE_XML_C})
+string(REGEX REPLACE "\n\"$" "\n" GEN_INDICATOR_SERVICE_XML_C ${GEN_INDICATOR_SERVICE_XML_C})
+string(PREPEND GEN_INDICATOR_SERVICE_XML_C "const char * _indicator_service = \n\"")
+string(APPEND GEN_INDICATOR_SERVICE_XML_C "\;")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/gen-indicator-service.xml.c" ${GEN_INDICATOR_SERVICE_XML_C})
+
+# libayatana-indicator3.so
+
+set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("ayatana-indicator3" SHARED ${SOURCES})
+set_target_properties("ayatana-indicator3" PROPERTIES VERSION 7.0.0 SOVERSION 7)
+target_compile_definitions("ayatana-indicator3" PUBLIC DG_LOG_DOMAIN="libayatana-indicator")
+target_include_directories("ayatana-indicator3" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("ayatana-indicator3" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories("ayatana-indicator3" PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
+target_link_libraries("ayatana-indicator3" ${PROJECT_DEPS_LIBRARIES})
+add_dependencies("ayatana-indicator3" "src-generated")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-indicator3.so" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-indicator3.so.7" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libayatana-indicator3.so.7.0.0" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..bb9c0f4
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,156 @@
+# dummy-indicator-blank
+
+set_source_files_properties(dummy-indicator-blank.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-blank" SHARED dummy-indicator-blank.c)
+target_include_directories("dummy-indicator-blank" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-blank" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# dummy-indicator-entry-func
+
+set_source_files_properties(dummy-indicator-entry-func.h PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-entry-func" SHARED dummy-indicator-entry-func.c)
+target_include_directories("dummy-indicator-entry-func" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-entry-func" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# dummy-indicator-null
+
+set_source_files_properties(dummy-indicator-null.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-null" SHARED dummy-indicator-null.c)
+target_include_directories("dummy-indicator-null" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-null" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# dummy-indicator-signaller
+
+set_source_files_properties(dummy-indicator-signaler.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-signaler" SHARED dummy-indicator-signaler.c)
+target_include_directories("dummy-indicator-signaler" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-signaler" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# dummy-indicator-simple
+
+set_source_files_properties(dummy-indicator-simple.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-simple" SHARED dummy-indicator-simple.c)
+target_include_directories("dummy-indicator-simple" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-simple" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# dummy-indicator-visible
+
+set_source_files_properties(dummy-indicator-visible.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("dummy-indicator-visible" SHARED dummy-indicator-visible.c)
+target_include_directories("dummy-indicator-visible" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("dummy-indicator-visible" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-manager-connect
+
+set_source_files_properties(service-manager-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-manager-connect" SHARED service-manager-connect.c)
+target_include_directories("service-manager-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-manager-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-manager-connect-service
+
+set_source_files_properties(service-manager-connect-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-manager-connect-service" SHARED service-manager-connect-service.c)
+target_include_directories("service-manager-connect-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-manager-connect-service" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-manager-no-connect
+
+set_source_files_properties(service-manager-no-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-manager-no-connect" SHARED service-manager-no-connect.c)
+target_include_directories("service-manager-no-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-manager-no-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-manager-nostart-connect
+
+set_source_files_properties(service-manager-nostart-connect.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-manager-nostart-connect" SHARED service-manager-nostart-connect.c)
+target_include_directories("service-manager-nostart-connect" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-manager-nostart-connect" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-shutdown-timeout
+
+set_source_files_properties(service-shutdown-timeout.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-shutdown-timeout" SHARED service-shutdown-timeout.c)
+target_include_directories("service-shutdown-timeout" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-shutdown-timeout" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-bad-service
+
+set_source_files_properties(service-version-bad-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-bad-service" SHARED service-version-bad-service.c)
+target_include_directories("service-version-bad-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-bad-service" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-good-service
+
+set_source_files_properties(service-version-good-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-good-service" SHARED service-version-good-service.c)
+target_include_directories("service-version-good-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-good-service" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-manager
+
+set_source_files_properties(service-version-manager.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-manager" SHARED service-version-manager.c)
+target_include_directories("service-version-manager" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-manager" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-multiwatch-manager
+
+set_source_files_properties(service-version-multiwatch-manager.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-multiwatch-manager" SHARED service-version-multiwatch-manager.c)
+target_include_directories("service-version-multiwatch-manager" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-multiwatch-manager" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-multiwatch-manager-impolite
+
+set_source_files_properties(service-version-multiwatch-manager-impolite.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-multiwatch-manager-impolite" SHARED service-version-multiwatch-manager-impolite.c)
+target_include_directories("service-version-multiwatch-manager-impolite" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-multiwatch-manager-impolite" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# service-version-multiwatch-service
+
+set_source_files_properties(service-version-multiwatch-service.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_library("service-version-multiwatch-service" SHARED service-version-multiwatch-service.c)
+target_include_directories("service-version-multiwatch-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("service-version-multiwatch-service" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+
+# test-desktop-shortcuts
+
+set_source_files_properties(test-desktop-shortcuts.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_executable("test-desktop-shortcuts" test-desktop-shortcuts.c)
+target_compile_definitions("test-desktop-shortcuts" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}")
+target_compile_definitions("test-desktop-shortcuts" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
+target_include_directories("test-desktop-shortcuts" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("test-desktop-shortcuts" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+target_link_libraries("test-desktop-shortcuts" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3)
+target_link_directories("test-desktop-shortcuts" PUBLIC "${CMAKE_BINARY_DIR}/src")
+add_dependencies("test-desktop-shortcuts" "ayatana-indicator3")
+add_test("test-desktop-shortcuts" "test-desktop-shortcuts")
+
+# test-indicator-ng
+
+set_source_files_properties(test-indicator-ng.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_executable("test-indicator-ng" test-indicator-ng.c)
+target_compile_definitions("test-indicator-ng" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}")
+target_compile_definitions("test-indicator-ng" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
+target_include_directories("test-indicator-ng" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("test-indicator-ng" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+target_link_libraries("test-indicator-ng" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3)
+target_link_directories("test-indicator-ng" PUBLIC "${CMAKE_BINARY_DIR}/src")
+add_dependencies("test-indicator-ng" "ayatana-indicator3")
+add_test("test-indicator-ng" "test-indicator-ng")
+
+# test-loader
+
+set_source_files_properties(test-loader.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_executable("test-loader" test-loader.c)
+target_compile_definitions("test-loader" PUBLIC BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}")
+target_include_directories("test-loader" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("test-loader" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+target_link_libraries("test-loader" ${PROJECT_DEPS_LIBRARIES} -layatana-indicator3)
+target_link_directories("test-loader" PUBLIC "${CMAKE_BINARY_DIR}/src")
+add_dependencies("test-loader" "ayatana-indicator3")
+add_test("test-loader" "test-loader")
diff --git a/tests/dummy-indicator-blank.c b/tests/dummy-indicator-blank.c
index b085c52..e4711ef 100644
--- a/tests/dummy-indicator-blank.c
+++ b/tests/dummy-indicator-blank.c
@@ -21,7 +21,7 @@ License along with this library. If not, see
*/
-#include "src/indicator.h"
+#include "indicator.h"
INDICATOR_SET_VERSION
diff --git a/tests/dummy-indicator-entry-func.h b/tests/dummy-indicator-entry-func.h
index b5653c7..791b98b 100644
--- a/tests/dummy-indicator-entry-func.h
+++ b/tests/dummy-indicator-entry-func.h
@@ -26,8 +26,8 @@ License along with this library. If not, see
#include <glib.h>
#include <glib-object.h>
-#include "src/indicator.h"
-#include "src/indicator-object.h"
+#include "indicator.h"
+#include "indicator-object.h"
G_BEGIN_DECLS
diff --git a/tests/dummy-indicator-null.c b/tests/dummy-indicator-null.c
index ee424d4..f306747 100644
--- a/tests/dummy-indicator-null.c
+++ b/tests/dummy-indicator-null.c
@@ -24,8 +24,8 @@ License along with this library. If not, see
#include <glib.h>
#include <glib-object.h>
-#include "src/indicator.h"
-#include "src/indicator-object.h"
+#include "indicator.h"
+#include "indicator-object.h"
#define DUMMY_INDICATOR_NULL_TYPE (dummy_indicator_null_get_type ())
#define DUMMY_INDICATOR_NULL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_NULL_TYPE, DummyIndicatorNull))
diff --git a/tests/dummy-indicator-signaler.c b/tests/dummy-indicator-signaler.c
index c963c6d..5caec72 100644
--- a/tests/dummy-indicator-signaler.c
+++ b/tests/dummy-indicator-signaler.c
@@ -23,8 +23,8 @@ License along with this library. If not, see
#include <glib.h>
#include <glib-object.h>
-#include "src/indicator.h"
-#include "src/indicator-object.h"
+#include "indicator.h"
+#include "indicator-object.h"
#define DUMMY_INDICATOR_SIGNALER_TYPE (dummy_indicator_signaler_get_type ())
#define DUMMY_INDICATOR_SIGNALER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_SIGNALER_TYPE, DummyIndicatorSignaler))
diff --git a/tests/dummy-indicator-simple.c b/tests/dummy-indicator-simple.c
index d62c991..07d56ed 100644
--- a/tests/dummy-indicator-simple.c
+++ b/tests/dummy-indicator-simple.c
@@ -23,8 +23,8 @@ License along with this library. If not, see
#include <glib.h>
#include <glib-object.h>
-#include "src/indicator.h"
-#include "src/indicator-object.h"
+#include "indicator.h"
+#include "indicator-object.h"
#define DUMMY_INDICATOR_SIMPLE_TYPE (dummy_indicator_simple_get_type ())
#define DUMMY_INDICATOR_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_SIMPLE_TYPE, DummyIndicatorSimple))
diff --git a/tests/dummy-indicator-visible.c b/tests/dummy-indicator-visible.c
index a9dbaf7..dc06abc 100644
--- a/tests/dummy-indicator-visible.c
+++ b/tests/dummy-indicator-visible.c
@@ -23,8 +23,8 @@ License along with this library. If not, see
#include <glib.h>
#include <glib-object.h>
-#include "src/indicator.h"
-#include "src/indicator-object.h"
+#include "indicator.h"
+#include "indicator-object.h"
#define DUMMY_INDICATOR_VISIBLE_TYPE (dummy_indicator_visible_get_type ())
#define DUMMY_INDICATOR_VISIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DUMMY_INDICATOR_VISIBLE_TYPE, DummyIndicatorVisible))
diff --git a/tests/service-manager-connect-service.c b/tests/service-manager-connect-service.c
index 85c353e..0193c2c 100644
--- a/tests/service-manager-connect-service.c
+++ b/tests/service-manager-connect-service.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service.h"
+#include "indicator-service.h"
static GMainLoop * mainloop = NULL;
static gboolean passed = FALSE;
diff --git a/tests/service-manager-connect.c b/tests/service-manager-connect.c
index 902efaa..46fbe54 100644
--- a/tests/service-manager-connect.c
+++ b/tests/service-manager-connect.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
static GMainLoop * mainloop = NULL;
static gboolean passed = FALSE;
diff --git a/tests/service-manager-no-connect.c b/tests/service-manager-no-connect.c
index 5f81118..2e52e3d 100644
--- a/tests/service-manager-no-connect.c
+++ b/tests/service-manager-no-connect.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
static GMainLoop * mainloop = NULL;
static gboolean passed = FALSE;
diff --git a/tests/service-manager-nostart-connect.c b/tests/service-manager-nostart-connect.c
index a0b09c3..77d3691 100644
--- a/tests/service-manager-nostart-connect.c
+++ b/tests/service-manager-nostart-connect.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
static GMainLoop * mainloop = NULL;
static gboolean passed = FALSE;
diff --git a/tests/service-shutdown-timeout.c b/tests/service-shutdown-timeout.c
index 5407c27..526be0f 100644
--- a/tests/service-shutdown-timeout.c
+++ b/tests/service-shutdown-timeout.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service.h"
+#include "indicator-service.h"
static GMainLoop * mainloop = NULL;
static gboolean passed = FALSE;
diff --git a/tests/service-version-bad-service.c b/tests/service-version-bad-service.c
index e5e3287..a991f7d 100644
--- a/tests/service-version-bad-service.c
+++ b/tests/service-version-bad-service.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service.h"
+#include "indicator-service.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/service-version-good-service.c b/tests/service-version-good-service.c
index 7a4abbb..b310c76 100644
--- a/tests/service-version-good-service.c
+++ b/tests/service-version-good-service.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service.h"
+#include "indicator-service.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/service-version-manager.c b/tests/service-version-manager.c
index 85e1b37..f6848da 100644
--- a/tests/service-version-manager.c
+++ b/tests/service-version-manager.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/service-version-multiwatch-manager-impolite.c b/tests/service-version-multiwatch-manager-impolite.c
index c22736e..19a5639 100644
--- a/tests/service-version-multiwatch-manager-impolite.c
+++ b/tests/service-version-multiwatch-manager-impolite.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/service-version-multiwatch-manager.c b/tests/service-version-multiwatch-manager.c
index 32a0079..385e17a 100644
--- a/tests/service-version-multiwatch-manager.c
+++ b/tests/service-version-multiwatch-manager.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service-manager.h"
+#include "indicator-service-manager.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/service-version-multiwatch-service.c b/tests/service-version-multiwatch-service.c
index ffad013..dc7d203 100644
--- a/tests/service-version-multiwatch-service.c
+++ b/tests/service-version-multiwatch-service.c
@@ -22,7 +22,7 @@ License along with this library. If not, see
#include <glib.h>
-#include "src/indicator-service.h"
+#include "indicator-service.h"
#include "service-version-values.h"
static GMainLoop * mainloop = NULL;
diff --git a/tests/test-desktop-shortcuts.c b/tests/test-desktop-shortcuts.c
index 02e313a..7c870b9 100644
--- a/tests/test-desktop-shortcuts.c
+++ b/tests/test-desktop-shortcuts.c
@@ -21,7 +21,7 @@ License along with this library. If not, see
*/
#include <gtk/gtk.h>
-#include "src/indicator-desktop-shortcuts.h"
+#include "indicator-desktop-shortcuts.h"
/* Basic object creation and destruction. Stop big
f*** ups here. */
diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c
index 80bbbb1..416c8da 100644
--- a/tests/test-indicator-ng.c
+++ b/tests/test-indicator-ng.c
@@ -1,5 +1,5 @@
-#include "src/indicator-ng.h"
+#include "indicator-ng.h"
static void
indicator_ng_test_func (gconstpointer user_data)
diff --git a/tests/test-loader.c b/tests/test-loader.c
index c1e4b6d..d1288cc 100644
--- a/tests/test-loader.c
+++ b/tests/test-loader.c
@@ -21,7 +21,7 @@ License along with this library. If not, see
*/
#include <gtk/gtk.h>
-#include "src/indicator-object.h"
+#include "indicator-object.h"
#include "dummy-indicator-entry-func.h"
@@ -47,7 +47,7 @@ entry_func_swap (IndicatorObject * io)
void
test_loader_entry_func_window (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-entry-func.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-entry-func.so");
g_assert(object != NULL);
DummyIndicatorEntryFunc * entryfunc = (DummyIndicatorEntryFunc *)(object);
@@ -72,7 +72,7 @@ test_loader_entry_func_window (void)
void
test_loader_entry_funcs (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-entry-func.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-entry-func.so");
g_assert(object != NULL);
DummyIndicatorEntryFunc * entryfunc = (DummyIndicatorEntryFunc *)(object);
@@ -115,7 +115,7 @@ entry_move_cb (IndicatorObject * io, IndicatorObjectEntry * entry, gint old, gin
void
test_loader_filename_dummy_signaler (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-signaler.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-signaler.so");
g_assert(object != NULL);
IndicatorObjectEntry *added_entry, *moved_entry, *removed_entry;
@@ -180,7 +180,7 @@ void
test_loader_filename_dummy_visible (void)
{
const GQuark is_hidden_quark = g_quark_from_static_string ("is-hidden");
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-visible.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-visible.so");
g_assert(object != NULL);
// create our local parent widgetry
@@ -245,7 +245,7 @@ test_loader_filename_dummy_visible (void)
void
test_loader_filename_dummy_simple_location (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-simple.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-simple.so");
g_assert(object != NULL);
GList * entries = indicator_object_get_entries(object);
@@ -266,7 +266,7 @@ test_loader_filename_dummy_simple_location (void)
void
test_loader_filename_dummy_simple_accessors (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-simple.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-simple.so");
g_assert(object != NULL);
g_assert(indicator_object_get_entries(object) != NULL);
@@ -279,7 +279,7 @@ test_loader_filename_dummy_simple_accessors (void)
void
test_loader_filename_dummy_simple (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-simple.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-simple.so");
g_assert(object != NULL);
gboolean unreffed = FALSE;
@@ -294,7 +294,7 @@ test_loader_filename_dummy_simple (void)
void
test_loader_filename_dummy_blank (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-blank.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-blank.so");
g_assert(object == NULL);
return;
}
@@ -302,7 +302,7 @@ test_loader_filename_dummy_blank (void)
void
test_loader_filename_dummy_null (void)
{
- IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/.libs/libdummy-indicator-null.so");
+ IndicatorObject * object = indicator_object_new_from_file(BUILD_DIR "/libdummy-indicator-null.so");
g_assert(object != NULL);
g_assert(indicator_object_get_entries(object) == NULL);
g_object_unref(G_OBJECT(object));
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
new file mode 100644
index 0000000..4120f31
--- /dev/null
+++ b/tools/CMakeLists.txt
@@ -0,0 +1,8 @@
+# ayatana-indicator-loader3
+
+set_source_files_properties(indicator-loader.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+add_executable("ayatana-indicator-loader3" indicator-loader.c)
+target_include_directories("ayatana-indicator-loader3" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
+target_include_directories("ayatana-indicator-loader3" PUBLIC "${CMAKE_SOURCE_DIR}/src")
+target_link_libraries("ayatana-indicator-loader3" ${PROJECT_DEPS_LIBRARIES} "-L${CMAKE_BINARY_DIR}/src" -layatana-indicator3)
+add_dependencies("ayatana-indicator-loader3" "ayatana-indicator3")
diff --git a/tools/indicator-loader.c b/tools/indicator-loader.c
index ad4fdf4..50b5143 100644
--- a/tools/indicator-loader.c
+++ b/tools/indicator-loader.c
@@ -25,9 +25,9 @@
#include <gtk/gtk.h>
#include <libayatana-ido/libayatana-ido.h>
-#include "src/indicator-object.h"
+#include "indicator-object.h"
#if GTK_CHECK_VERSION (3,0,0)
- #include "src/indicator-ng.h"
+ #include "indicator-ng.h"
#endif
static GHashTable * entry_to_menu_item = NULL;