diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f371baf32..aeb45a7bd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -402,7 +402,7 @@ if(ENABLE_STATIC) ) endif() if(ENABLE_SHARED) - set(LINPHONE_RESOURCES "${CMAKE_SOURCE_DIR}/share/cpim_grammar") + set(LINPHONE_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../share/cpim_grammar") #keep it relative to current dir to allow CMakeList inclusion add_library(linphone SHARED ${LINPHONE_RESOURCES} ${LINPHONE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES} ${LINPHONE_OBJC_SOURCE_FILES} $ diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt index 48481e88d..5ac5eeddc 100644 --- a/tester/CMakeLists.txt +++ b/tester/CMakeLists.txt @@ -20,7 +20,7 @@ # ############################################################################ -set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES} ${XSD_LIBRARIES}) +set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES} ${XSD_LIBRARIES} ${BELR_LIBRARIES}) if(INTL_FOUND) list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES}) endif() diff --git a/tester/cpim-tester.cpp b/tester/cpim-tester.cpp index 8e2e0c3dd..458399e6d 100644 --- a/tester/cpim-tester.cpp +++ b/tester/cpim-tester.cpp @@ -23,7 +23,7 @@ #include "content/content-type.h" #include "content/content.h" #include "core/core.h" - +#include "belr/grammarbuilder.h" // TODO: Remove me later. #include "private.h" @@ -151,6 +151,7 @@ static void parse_message_with_generic_header_parameters () { } static void build_message () { + Cpim::Message message; // Set message headers. @@ -310,7 +311,12 @@ test_t cpim_tests[] = { TEST_NO_TAG("CPIM chat message modifier with multipart body", cpim_chat_message_modifier_with_multipart_body) }; +static int suite_begin(void) { + //Supposed to be done by platform helper, but in this case, we don't have it" + belr::GrammarLoader::get().load(bc_tester_res("share/belr/grammars/cpim_grammars")); + return 0; +} test_suite_t cpim_test_suite = { - "Cpim", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each, + "Cpim", suite_begin, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each, sizeof(cpim_tests) / sizeof(cpim_tests[0]), cpim_tests };