From 2c2435568b5e3ecf70f18b84b96a667509150a5e Mon Sep 17 00:00:00 2001 From: InHong Han Date: Fri, 11 Dec 2020 14:08:31 +0900 Subject: [PATCH] Reorganize directory structure Change-Id: I7f66fb73b28a7172b1284b1abe2ecb9723bdc563 --- CMakeLists.txt | 13 +- client/CMakeLists.txt | 33 ++++ {consumer => client/inc}/sticker_consumer_main.h | 0 client/{ => inc}/sticker_data_main.h | 0 client/{ => inc}/sticker_defs.h | 0 {provider => client/inc}/sticker_provider_main.h | 0 {consumer => client/src}/sticker_consumer.c | 197 +++++------------------ client/{ => src}/sticker_data.c | 46 +----- client/{ => src}/sticker_dbus.c | 46 +----- client/{ => src}/sticker_dbus.h | 0 {provider => client/src}/sticker_provider.c | 45 +----- consumer/CMakeLists.txt | 23 --- provider/CMakeLists.txt | 23 --- tests/CMakeLists.txt | 2 +- 14 files changed, 80 insertions(+), 348 deletions(-) create mode 100644 client/CMakeLists.txt rename {consumer => client/inc}/sticker_consumer_main.h (100%) rename client/{ => inc}/sticker_data_main.h (100%) rename client/{ => inc}/sticker_defs.h (100%) rename {provider => client/inc}/sticker_provider_main.h (100%) rename {consumer => client/src}/sticker_consumer.c (71%) rename client/{ => src}/sticker_data.c (93%) rename client/{ => src}/sticker_dbus.c (97%) rename client/{ => src}/sticker_dbus.h (100%) rename {provider => client/src}/sticker_provider.c (92%) delete mode 100644 consumer/CMakeLists.txt delete mode 100644 provider/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index b36454f..2c8aa49 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,9 +9,7 @@ ADD_DEFINITIONS("-Werror") ## Include common directory ## INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include") -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/client") -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/provider") -INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/consumer") +INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/client/inc") ## Dependent packages ## INCLUDE(FindPkgConfig) @@ -35,15 +33,12 @@ pkg_check_modules(pkgs REQUIRED ## API ## ADD_SUBDIRECTORY(include) +## Sticker client ## +ADD_SUBDIRECTORY(client) + ## Sticker server ## ADD_SUBDIRECTORY(server) -## Sticker provider library ## -ADD_SUBDIRECTORY(provider) - -## Sticker consumer library ## -ADD_SUBDIRECTORY(consumer) - ## Sticker parser ## ADD_SUBDIRECTORY(sticker-parser) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt new file mode 100644 index 0000000..be848fc --- /dev/null +++ b/client/CMakeLists.txt @@ -0,0 +1,33 @@ +SET(CONSUMER_SRCS + src/sticker_consumer.c + src/sticker_data.c + src/sticker_dbus.c +) + +SET(PROVIDER_SRCS + src/sticker_provider.c + src/sticker_data.c + src/sticker_dbus.c +) + +INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/client/inc) + +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall") + +## Add definitions ## +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") + +## sticker consumer library ## +ADD_LIBRARY(${PROJECT_NAME}-consumer SHARED ${CONSUMER_SRCS}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME}-consumer ${pkgs_LDFLAGS}) + +## sticker provider library ## +ADD_LIBRARY(${PROJECT_NAME}-provider SHARED ${PROVIDER_SRCS}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME}-provider ${pkgs_LDFLAGS}) + +## Install library files ## +INSTALL(TARGETS ${PROJECT_NAME}-consumer DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) +INSTALL(TARGETS ${PROJECT_NAME}-provider DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) \ No newline at end of file diff --git a/consumer/sticker_consumer_main.h b/client/inc/sticker_consumer_main.h similarity index 100% rename from consumer/sticker_consumer_main.h rename to client/inc/sticker_consumer_main.h diff --git a/client/sticker_data_main.h b/client/inc/sticker_data_main.h similarity index 100% rename from client/sticker_data_main.h rename to client/inc/sticker_data_main.h diff --git a/client/sticker_defs.h b/client/inc/sticker_defs.h similarity index 100% rename from client/sticker_defs.h rename to client/inc/sticker_defs.h diff --git a/provider/sticker_provider_main.h b/client/inc/sticker_provider_main.h similarity index 100% rename from provider/sticker_provider_main.h rename to client/inc/sticker_provider_main.h diff --git a/consumer/sticker_consumer.c b/client/src/sticker_consumer.c similarity index 71% rename from consumer/sticker_consumer.c rename to client/src/sticker_consumer.c index 4f51fb5..39297bf 100644 --- a/consumer/sticker_consumer.c +++ b/client/src/sticker_consumer.c @@ -33,47 +33,6 @@ static cynara *p_cynara = NULL; -static void _free_sticker_data(sticker_data_h sticker_data) -{ - if (sticker_data->app_id) { - free(sticker_data->app_id); - sticker_data->app_id = NULL; - } - - if (sticker_data->uri) { - free(sticker_data->uri); - sticker_data->uri = NULL; - } - - if (sticker_data->thumbnail) { - free(sticker_data->thumbnail); - sticker_data->thumbnail = NULL; - } - - if (sticker_data->keyword) { - g_list_free_full(sticker_data->keyword, free); - sticker_data->keyword = NULL; - } - - if (sticker_data->group) { - free(sticker_data->group); - sticker_data->group = NULL; - } - - if (sticker_data->description) { - free(sticker_data->description); - sticker_data->description = NULL; - } - - if (sticker_data->date) { - free(sticker_data->date); - sticker_data->date = NULL; - } - - free(sticker_data); - sticker_data = NULL; -} - static int _cynara_initialize() { int ret = cynara_initialize(&p_cynara, NULL); @@ -143,6 +102,30 @@ static int _sticker_check_privilege() { return ret; } +static int _call_sticker_data_foreach_cb(sticker_consumer_h consumer_handle, GVariantIter *id_iter, sticker_consumer_data_foreach_cb callback, void *user_data) +{ + int ret; + int info_id; + int count = 0; + + if (!id_iter) return count; + + while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { + sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); + if (!sticker_data) + continue; + + ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); + if (ret == STICKER_ERROR_NONE) { + count++; + callback(sticker_data, user_data); + } + sticker_data_destroy(sticker_data); + } + + return count; +} + EXPORT_API int sticker_consumer_create(sticker_consumer_h *consumer_handle) { CHECK_STICKER_FEATURE(); @@ -220,7 +203,6 @@ EXPORT_API int sticker_consumer_data_foreach_all(sticker_consumer_h consumer_han CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -234,25 +216,8 @@ EXPORT_API int sticker_consumer_data_foreach_all(sticker_consumer_h consumer_han goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; @@ -268,7 +233,6 @@ EXPORT_API int sticker_consumer_data_foreach_by_keyword(sticker_consumer_h consu CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -282,25 +246,8 @@ EXPORT_API int sticker_consumer_data_foreach_by_keyword(sticker_consumer_h consu goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; @@ -316,7 +263,6 @@ EXPORT_API int sticker_consumer_data_foreach_by_group(sticker_consumer_h consume CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -330,25 +276,8 @@ EXPORT_API int sticker_consumer_data_foreach_by_group(sticker_consumer_h consume goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; @@ -364,7 +293,6 @@ EXPORT_API int sticker_consumer_data_foreach_by_type(sticker_consumer_h consumer CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -378,25 +306,8 @@ EXPORT_API int sticker_consumer_data_foreach_by_type(sticker_consumer_h consumer goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; @@ -468,7 +379,6 @@ EXPORT_API int sticker_consumer_data_foreach_by_display_type(sticker_consumer_h CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -482,25 +392,8 @@ EXPORT_API int sticker_consumer_data_foreach_by_display_type(sticker_consumer_h goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; @@ -562,7 +455,6 @@ EXPORT_API int sticker_consumer_get_recent_data_list(sticker_consumer_h consumer CHECK_STICKER_FEATURE(); int ret; - int info_id; int sticker_count = 0; GVariantIter *id_iter = NULL; @@ -576,25 +468,8 @@ EXPORT_API int sticker_consumer_get_recent_data_list(sticker_consumer_h consumer goto cleanup; } - if (id_iter) { - while (g_variant_iter_loop (id_iter, "(i)", &info_id)) { - sticker_data_h sticker_data = (sticker_data_h)calloc(1, sizeof(struct sticker_data_s)); - if (!sticker_data) { - ret = STICKER_ERROR_OUT_OF_MEMORY; - goto cleanup; - } - - ret = sticker_dbus_get_sticker_info_by_record_id(consumer_handle->gdbus_connection, sticker_data, info_id); - if (ret == STICKER_ERROR_NONE) { - sticker_count++; - callback(sticker_data, user_data); - _free_sticker_data(sticker_data); - } else { - _free_sticker_data(sticker_data); - goto cleanup; - } - } - } + if (id_iter) + sticker_count = _call_sticker_data_foreach_cb(consumer_handle, id_iter, callback, user_data); *result = sticker_count; diff --git a/client/sticker_data.c b/client/src/sticker_data.c similarity index 93% rename from client/sticker_data.c rename to client/src/sticker_data.c index c0a5869..85d407e 100644 --- a/client/sticker_data.c +++ b/client/src/sticker_data.c @@ -93,50 +93,6 @@ cleanup: return NULL; } -static void _free_sticker_data(sticker_data_h sticker_data) -{ - if (!sticker_data) - return; - - if (sticker_data->app_id) { - free(sticker_data->app_id); - sticker_data->app_id = NULL; - } - - if (sticker_data->uri) { - free(sticker_data->uri); - sticker_data->uri = NULL; - } - - if (sticker_data->thumbnail) { - free(sticker_data->thumbnail); - sticker_data->thumbnail = NULL; - } - - if (sticker_data->keyword) { - g_list_free_full(sticker_data->keyword, free); - sticker_data->keyword = NULL; - } - - if (sticker_data->group) { - free(sticker_data->group); - sticker_data->group = NULL; - } - - if (sticker_data->description) { - free(sticker_data->description); - sticker_data->description = NULL; - } - - if (sticker_data->date) { - free(sticker_data->date); - sticker_data->date = NULL; - } - - free(sticker_data); - sticker_data = NULL; -} - EXPORT_API int sticker_data_create(sticker_data_h *data_handle) { CHECK_STICKER_FEATURE(); @@ -317,7 +273,7 @@ EXPORT_API int sticker_data_get_handle(const char* uri, sticker_data_h *data_han cleanup: if (handle) - _free_sticker_data(handle); + sticker_data_destroy(handle); if (gdbus_connection) { int ret_err = sticker_dbus_shutdown(gdbus_connection, &server_watcher_id, &server_monitor_id, &monitor_id, STICKER_CLIENT_LIB_PROVIDER); diff --git a/client/sticker_dbus.c b/client/src/sticker_dbus.c similarity index 97% rename from client/sticker_dbus.c rename to client/src/sticker_dbus.c index af01532..a9f5635 100644 --- a/client/sticker_dbus.c +++ b/client/src/sticker_dbus.c @@ -133,47 +133,6 @@ static void _get_sticker_info_from_gvariant(GVariantIter *info_iter, GVariantIte g_variant_iter_free(keyword_iter); } -static void _free_sticker_data(sticker_data_h sticker_data) -{ - if (sticker_data->app_id) { - free(sticker_data->app_id); - sticker_data->app_id = NULL; - } - - if (sticker_data->uri) { - free(sticker_data->uri); - sticker_data->uri = NULL; - } - - if (sticker_data->thumbnail) { - free(sticker_data->thumbnail); - sticker_data->thumbnail = NULL; - } - - if (sticker_data->keyword) { - g_list_free_full(sticker_data->keyword, free); - sticker_data->keyword = NULL; - } - - if (sticker_data->group) { - free(sticker_data->group); - sticker_data->group = NULL; - } - - if (sticker_data->description) { - free(sticker_data->description); - sticker_data->description = NULL; - } - - if (sticker_data->date) { - free(sticker_data->date); - sticker_data->date = NULL; - } - - free(sticker_data); - sticker_data = NULL; -} - static void _call_insert_finished_cb(sticker_provider_h provider_handle, GVariant *body) { int ret; @@ -196,6 +155,7 @@ static void _handle_sticker_consumer_cb(GDBusConnection *connection, gpointer user_data) { LOGD("own_name : %s, signal_name : %s", g_dbus_connection_get_unique_name(connection), signal_name); + sticker_consumer_h consumer_handle = (sticker_consumer_h)user_data; if (consumer_handle == NULL) { @@ -226,7 +186,7 @@ static void _handle_sticker_consumer_cb(GDBusConnection *connection, if (keyword_iter) g_variant_iter_free(keyword_iter); - _free_sticker_data(sticker_data); + sticker_data_destroy(sticker_data); } } } @@ -792,7 +752,7 @@ int sticker_dbus_update_sticker_info(GDBusConnection *gdbus_connection, sticker_ ret = _send_sync_message(gdbus_connection, g_variant_new("(i)", sticker_data->sticker_info_id), &reply, "send_update_event"); cleanup: - _free_sticker_data(origin_data); + sticker_data_destroy(origin_data); if (reply_body) g_variant_unref(reply_body); diff --git a/client/sticker_dbus.h b/client/src/sticker_dbus.h similarity index 100% rename from client/sticker_dbus.h rename to client/src/sticker_dbus.h diff --git a/provider/sticker_provider.c b/client/src/sticker_provider.c similarity index 92% rename from provider/sticker_provider.c rename to client/src/sticker_provider.c index bbac999..18181c9 100644 --- a/provider/sticker_provider.c +++ b/client/src/sticker_provider.c @@ -30,47 +30,6 @@ #endif #define LOG_TAG "STICKER_PROVIDER" -static void _free_sticker_data(sticker_data_h sticker_data) -{ - if (sticker_data->app_id) { - free(sticker_data->app_id); - sticker_data->app_id = NULL; - } - - if (sticker_data->uri) { - free(sticker_data->uri); - sticker_data->uri = NULL; - } - - if (sticker_data->thumbnail) { - free(sticker_data->thumbnail); - sticker_data->thumbnail = NULL; - } - - if (sticker_data->keyword) { - g_list_free_full(sticker_data->keyword, free); - sticker_data->keyword = NULL; - } - - if (sticker_data->group) { - free(sticker_data->group); - sticker_data->group = NULL; - } - - if (sticker_data->description) { - free(sticker_data->description); - sticker_data->description = NULL; - } - - if (sticker_data->date) { - free(sticker_data->date); - sticker_data->date = NULL; - } - - free(sticker_data); - sticker_data = NULL; -} - EXPORT_API int sticker_provider_create(sticker_provider_h *provider_handle) { CHECK_STICKER_FEATURE(); @@ -371,9 +330,9 @@ EXPORT_API int sticker_provider_data_foreach_all(sticker_provider_h provider_han if (ret == STICKER_ERROR_NONE) { sticker_count++; callback(sticker_data, user_data); - _free_sticker_data(sticker_data); + sticker_data_destroy(sticker_data); } else { - _free_sticker_data(sticker_data); + sticker_data_destroy(sticker_data); goto cleanup; } } diff --git a/consumer/CMakeLists.txt b/consumer/CMakeLists.txt deleted file mode 100644 index f98cc42..0000000 --- a/consumer/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -SET(SRCS - sticker_consumer.c - ../client/sticker_data.c - ../client/sticker_dbus.c -) - -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include) - -FOREACH(flag ${pkgs_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") -ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall") - -## Add definitions ## -ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") - -## sticker consumer library ## -ADD_LIBRARY(${PROJECT_NAME}-consumer SHARED ${SRCS}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME}-consumer ${pkgs_LDFLAGS}) - -## Install library files ## -INSTALL(TARGETS ${PROJECT_NAME}-consumer DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) diff --git a/provider/CMakeLists.txt b/provider/CMakeLists.txt deleted file mode 100644 index ea3c48a..0000000 --- a/provider/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -SET(SRCS - sticker_provider.c - ../client/sticker_data.c - ../client/sticker_dbus.c -) - -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include) - -FOREACH(flag ${pkgs_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") -ENDFOREACH(flag) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall") - -## Add definitions ## -ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") - -## sticker provider library ## -ADD_LIBRARY(${PROJECT_NAME}-provider SHARED ${SRCS}) -TARGET_LINK_LIBRARIES(${PROJECT_NAME}-provider ${pkgs_LDFLAGS}) - -## Install library files ## -INSTALL(TARGETS ${PROJECT_NAME}-provider DESTINATION ${LIBDIR} COMPONENT RuntimeLibraries) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f28995b..032be6a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,7 +17,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/mock) AUX_SOURCE_DIRECTORY(src SOURCES) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../common STICKER_COMMON_SOURCES) -AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../client STICKER_CLIENT_SOURCES) +AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../client/src STICKER_CLIENT_SOURCES) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../consumer STICKER_CONSUMER_SOURCES) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../provider STICKER_PROVIDER_SOURCES) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/mock MOCK_SRCS) -- 2.7.4