Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lw/cmake cleanup #837

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ project(wakaama C)

include(wakaama.cmake)

add_subdirectory(examples)

# Enable "test" target
enable_testing()
add_subdirectory(tests)
20 changes: 0 additions & 20 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
"WAKAAMA_MODE_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_ENABLE_EXAMPLES": {
"type": "BOOL",
"value": "ON"
}
}
},
Expand All @@ -41,10 +37,6 @@
"WAKAAMA_MODE_BOOTSTRAP_SERVER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_ENABLE_EXAMPLES": {
"type": "BOOL",
"value": "ON"
}
}
},
Expand All @@ -61,10 +53,6 @@
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_ENABLE_EXAMPLES": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_DATA_SENML_JSON": {
"type": "BOOL",
"value": "ON"
Expand Down Expand Up @@ -100,10 +88,6 @@
"hidden": true,
"inherits": "base",
"cacheVariables": {
"WAKAAMA_ENABLE_EXAMPLES": {
"type": "BOOL",
"value": "OFF"
},
"WAKAAMA_DATA_TLV": {
"type": "BOOL",
"value": "ON"
Expand All @@ -123,10 +107,6 @@
"WAKAAMA_LOG_CUSTOM_HANDLER": {
"type": "BOOL",
"value": "ON"
},
"WAKAAMA_ENABLE_EXAMPLES": {
"type": "BOOL",
"value": "OFF"
}
}
},
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ pytest -v tests/integration

## Examples

The examples can be enabled (or disabled) with the CMake cache variable `WAKAAMA_ENABLE_EXAMPLES` (e.g.
`cmake -DWAKAAMA_ENABLE_EXAMPLES=OFF`).

There are some example applications provided to test the server, client and bootstrap capabilities of Wakaama.
The following recipes assume you are on a unix like platform and you have cmake and make installed.

Expand Down
4 changes: 0 additions & 4 deletions examples/CMakeLists.txt

This file was deleted.

27 changes: 0 additions & 27 deletions wakaama.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -296,33 +296,6 @@ target_include_directories(wakaama_transport_testing_fake PUBLIC ${WAKAAMA_TOP_L
target_include_directories(wakaama_transport_testing_fake PRIVATE ${WAKAAMA_TOP_LEVEL_DIRECTORY}/include/)
target_sources(wakaama_transport_testing_fake PRIVATE ${WAKAAMA_TOP_LEVEL_DIRECTORY}/tests/helper/connection.c)

# Add shared source files to an existing target.
function(target_sources_shared target)
get_target_property(TARGET_PROPERTY_CONN_IMPL ${target} CONNECTION_IMPLEMENTATION)

if(WAKAAMA_PLATFORM STREQUAL POSIX)
target_link_libraries(${target} PRIVATE wakaama_command_line wakaama_platform_posix)
endif()

if(WAKAAMA_CLI)
target_link_libraries(${target} PRIVATE wakaama_command_line)
endif()

set_defines(${target})

if(NOT TARGET_PROPERTY_CONN_IMPL OR WAKAAMA_TRANSPORT STREQUAL POSIX_UDP)
target_link_libraries(${target} PRIVATE wakaama_transport_posix_udp)
elseif(TARGET_PROPERTY_CONN_IMPL MATCHES "tinydtls" OR WAKAAMA_TRANSPORT STREQUAL TINYDTLS)
target_link_libraries(${target} PRIVATE wakaama_transport_tinydtls)
else()
message(
FATAL_ERROR "${target}: Unknown connection (DTLS) implementation '${TARGET_PROPERTY_CONN_IMPL} requested"
)
endif()

target_include_directories(${target} PUBLIC ${WAKAAMA_EXAMPLE_SHARED_DIRECTORY})
endfunction()

# Static library that users of Wakaama can link against
#
# This library simplifies building and maintaining Wakaama. It handles defines and compiler flags, adding the right
Expand Down
Loading