diff --git a/CMakeLists.txt b/CMakeLists.txt index 16076dec..e219feeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,8 +76,6 @@ else () endif () add_subdirectory (common) -add_subdirectory (nano-stack) -add_subdirectory (mbed-trace-edge) add_subdirectory (edge-client) add_subdirectory (lib) add_subdirectory (edge-core) diff --git a/cmake/edge_configure.cmake b/cmake/edge_configure.cmake index 606af778..86b81be7 100644 --- a/cmake/edge_configure.cmake +++ b/cmake/edge_configure.cmake @@ -251,11 +251,3 @@ SET (MBED_CONF_MBED_CLIENT_DNS_THREAD_STACK_SIZE 131072) SET (SA_PV_PLAT_PC 1) SET (RESOURCE_ATTRIBUTES_LIST 1) -#Following is needed for tests -FILE (GLOB LIBSERVICE_SOURCE - "${CMAKE_CURRENT_SOURCE_DIR}/lib/mbed-cloud-client/nanostack-libservice/source/libBits/common_functions.c" - "${CMAKE_CURRENT_SOURCE_DIR}/lib/mbed-cloud-client/nanostack-libservice/source/libList/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/lib/mbed-cloud-client/nanostack-libservice/source/nsdynmemLIB/*.c" - "${CMAKE_CURRENT_SOURCE_DIR}/lib/mbed-cloud-client/nanostack-libservice/source/libip6string/ip6tos.c" - ) -CREATE_LIBRARY(libservice "${LIBSERVICE_SOURCE}" "") diff --git a/edge-core/CMakeLists.txt b/edge-core/CMakeLists.txt index 0992b3eb..219055fe 100644 --- a/edge-core/CMakeLists.txt +++ b/edge-core/CMakeLists.txt @@ -32,7 +32,7 @@ if(ENABLE_UC_HUB) endif() if (TARGET_GROUP STREQUAL test) - target_link_libraries (edge-core jansson jsonrpc libevent-mock-lib rpc mbedTrace libservice edge-client-mock-lib pal-mock-lib test-lib pthread mbed-cloud-client-mock mbedtls) + target_link_libraries (edge-core jansson jsonrpc libevent-mock-lib rpc mbedTrace nanostacklibservice edge-client-mock-lib pal-mock-lib test-lib pthread mbed-cloud-client-mock mbedtls) else () target_link_libraries (edge-core jansson websockets event rpc edge-client fccstorage) endif () diff --git a/mbed-trace-edge/CMakeLists.txt b/mbed-trace-edge/CMakeLists.txt deleted file mode 100644 index 8f44a0c1..00000000 --- a/mbed-trace-edge/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# This is needed because mbedTrace in mbed-cloud-client doesn't depend on nanostack. -# And that's because nanostack does not use CMake. - -file (GLOB SOURCES ../lib/mbed-cloud-client/mbed-trace/source/*.c) -add_library(mbedTraceEdge ${SOURCES}) - -target_link_libraries(mbedTraceEdge nanostack) diff --git a/nano-stack/CMakeLists.txt b/nano-stack/CMakeLists.txt deleted file mode 100644 index b9467beb..00000000 --- a/nano-stack/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file (GLOB SOURCES ../lib/mbed-cloud-client/nanostack-libservice/source/libList/*.c) -file (GLOB BIT_SOURCES ../lib/mbed-cloud-client/nanostack-libservice/source/libBits/*.c) -file (GLOB STRING_SOURCES ../lib/mbed-cloud-client/nanostack-libservice/source/libip6string/*.c) - -list (APPEND SOURCES ${BIT_SOURCES}) -list (APPEND SOURCES ${STRING_SOURCES}) - -add_library (nanostack STATIC ${SOURCES}) diff --git a/pt-client-2/CMakeLists.txt b/pt-client-2/CMakeLists.txt index febff612..5fc15bfd 100644 --- a/pt-client-2/CMakeLists.txt +++ b/pt-client-2/CMakeLists.txt @@ -45,9 +45,9 @@ endif() SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -shared") if (TARGET_GROUP STREQUAL test) - target_link_libraries (pt-client-2 jansson rpc mbedTraceEdge) + target_link_libraries (pt-client-2 jansson rpc nanostacklibservice mbedTrace) else () target_link_libraries (pt-client-2 edge-websocket-common edge-integer-length edge-apr-base64 edge-default-message-id-generator - pt-api-error-codes edge-msg-api event jansson websockets rpc nanostack mbedTraceEdge) + pt-api-error-codes edge-msg-api event jansson websockets rpc nanostacklibservice mbedTrace) endif() diff --git a/pt-client/CMakeLists.txt b/pt-client/CMakeLists.txt index caee4048..ef00210d 100644 --- a/pt-client/CMakeLists.txt +++ b/pt-client/CMakeLists.txt @@ -25,7 +25,7 @@ target_include_directories (pt-client PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../edge-r SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -shared") if (TARGET_GROUP STREQUAL test) - target_link_libraries (pt-client jansson rpc mbedTraceEdge) + target_link_libraries (pt-client jansson rpc nanostacklibservice mbedTrace) else () - target_link_libraries (pt-client event jansson websockets rpc nanostack mbedTraceEdge) + target_link_libraries (pt-client event jansson websockets rpc nanostacklibservice mbedTrace) endif() diff --git a/test/edge-client/CMakeLists.txt b/test/edge-client/CMakeLists.txt index 6ec5f71b..88d68082 100644 --- a/test/edge-client/CMakeLists.txt +++ b/test/edge-client/CMakeLists.txt @@ -12,6 +12,6 @@ include_directories (../cpputest-custom-types) target_include_directories (edge-client-test PUBLIC ${CPPUTEST_HOME}/include) target_include_directories (edge-client-test PUBLIC ${ROOT_HOME}/test/test-lib) target_include_directories (edge-client-test PUBLIC ${ROOT_HOME}/lib/mbed-cloud-client/unittests/stub) -target_link_libraries (edge-client-test edge-server-mock-lib pal-mock-lib test-lib edge-client CppUTest CppUTestExt mbedTrace libservice pthread curl) +target_link_libraries (edge-client-test edge-server-mock-lib pal-mock-lib test-lib edge-client CppUTest CppUTestExt mbedTrace nanostacklibservice pthread curl) add_definitions(-DTEST_DATA_DIR="${TEST_DATA_DIR}") diff --git a/test/edge-io-lib/CMakeLists.txt b/test/edge-io-lib/CMakeLists.txt index 41b9053b..1a823263 100644 --- a/test/edge-io-lib/CMakeLists.txt +++ b/test/edge-io-lib/CMakeLists.txt @@ -9,5 +9,5 @@ add_definitions(-DMBED_CONF_MBED_TRACE_ENABLE=1) target_include_directories (edge-io-lib-test PUBLIC ${CPPUTEST_HOME}/include) -target_link_libraries (edge-io-lib-test mbedTraceEdge CppUTest CppUTestExt) +target_link_libraries (edge-io-lib-test nanostacklibservice mbedTrace CppUTest CppUTestExt) diff --git a/test/edge-rpc/CMakeLists.txt b/test/edge-rpc/CMakeLists.txt index 791d691f..9e3b5d6d 100644 --- a/test/edge-rpc/CMakeLists.txt +++ b/test/edge-rpc/CMakeLists.txt @@ -10,4 +10,4 @@ target_include_directories (edge-rpc-test PUBLIC ${CPPUTEST_HOME}/include) target_include_directories (edge-rpc-test PUBLIC ${ROOT_HOME}/lib/jsonrpc) target_include_directories (edge-rpc-test PUBLIC ${ROOT_HOME}/test/test-lib) -target_link_libraries (edge-rpc-test test-lib libevent-mock-lib rpc jansson jsonrpc mbedTrace libservice CppUTest CppUTestExt) +target_link_libraries (edge-rpc-test test-lib libevent-mock-lib rpc jansson jsonrpc mbedTrace nanostacklibservice CppUTest CppUTestExt) diff --git a/test/pt-client-2/CMakeLists.txt b/test/pt-client-2/CMakeLists.txt index 79b1cb3e..06dac953 100644 --- a/test/pt-client-2/CMakeLists.txt +++ b/test/pt-client-2/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories (../cpputest-custom-types ../libwebsocket-mock) target_include_directories (pt-client-2-test PUBLIC ${CPPUTEST_HOME}/include) target_include_directories (pt-client-2-test PUBLIC ${ROOT_HOME}/test/test-lib) -target_link_libraries (pt-client-2-test nanostack edge-mutex-mock pt-client-2 +target_link_libraries (pt-client-2-test nanostacklibservice edge-mutex-mock pt-client-2 edge-apr-base64 edge-default-message-id-generator pt-api-error-codes edge-websocket-common-mock edge-msg-api-common-mock edge-mutex-helper - libwebsocket-mock-minimal-lib libevent-mock-lib CppUTest CppUTestExt pthread) + libwebsocket-mock-minimal-lib libevent-mock-lib CppUTest CppUTestExt pthread mbedTrace) diff --git a/test/pt-client/CMakeLists.txt b/test/pt-client/CMakeLists.txt index 071503b5..e7fcfeed 100644 --- a/test/pt-client/CMakeLists.txt +++ b/test/pt-client/CMakeLists.txt @@ -12,4 +12,4 @@ include_directories (../cpputest-custom-types ../libwebsocket-mock) target_include_directories (pt-client-test PUBLIC ${CPPUTEST_HOME}/include) target_include_directories (pt-client-test PUBLIC ${ROOT_HOME}/test/test-lib) -target_link_libraries (pt-client-test nanostack pt-client libwebsocket-mock-lib libevent-mock-lib test-lib CppUTest CppUTestExt pthread) +target_link_libraries (pt-client-test nanostacklibservice mbedTrace pt-client libwebsocket-mock-lib libevent-mock-lib test-lib CppUTest CppUTestExt pthread)