mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Add CMake support
Change-Id: I716e1fa3ec43bfe57326f5a691131505f84b7832
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
add_library(core STATIC)
|
||||
|
||||
target_sources(core
|
||||
PUBLIC
|
||||
core.h
|
||||
)
|
||||
|
||||
target_include_directories(core
|
||||
PUBLIC
|
||||
${PROJECT_SOURCE_DIR}/cpp
|
||||
)
|
||||
|
||||
target_link_libraries(core
|
||||
PUBLIC
|
||||
core_internal
|
||||
platform_types
|
||||
)
|
||||
|
||||
add_library(core_types STATIC)
|
||||
|
||||
target_sources(core_types
|
||||
PRIVATE
|
||||
payload.cc
|
||||
strategy.cc
|
||||
PUBLIC
|
||||
listeners.h
|
||||
options.h
|
||||
params.h
|
||||
payload.h
|
||||
status.h
|
||||
strategy.h
|
||||
)
|
||||
|
||||
target_link_libraries(core_types
|
||||
PUBLIC
|
||||
platform_api
|
||||
platform_port_string
|
||||
platform_types
|
||||
platform_utils
|
||||
)
|
||||
|
||||
add_executable(core_build_test
|
||||
check_compilation.cc
|
||||
)
|
||||
|
||||
target_link_libraries(core_build_test
|
||||
PUBLIC
|
||||
absl::strings
|
||||
core
|
||||
core_types
|
||||
platform_impl_default_lock
|
||||
platform_impl_sample
|
||||
platform_port_string
|
||||
platform_types
|
||||
platform_utils
|
||||
)
|
||||
|
||||
add_subdirectory(internal)
|
||||
@@ -0,0 +1,80 @@
|
||||
add_library(core_internal STATIC)
|
||||
|
||||
target_sources(core_internal
|
||||
PRIVATE
|
||||
ble_advertisement.cc
|
||||
bluetooth_device_name.cc
|
||||
internal_payload.cc
|
||||
internal_payload.h
|
||||
loop_runner.cc
|
||||
loop_runner.h
|
||||
offline_frames.cc
|
||||
offline_frames.h
|
||||
PUBLIC
|
||||
bandwidth_upgrade_handler.h
|
||||
bandwidth_upgrade_manager.h
|
||||
base_bandwidth_upgrade_handler.h
|
||||
base_endpoint_channel.h
|
||||
base_pcp_handler.h
|
||||
ble_advertisement.h
|
||||
ble_compat.h
|
||||
ble_endpoint_channel.h
|
||||
bluetooth_device_name.h
|
||||
bluetooth_endpoint_channel.h
|
||||
client_proxy.h
|
||||
encryption_runner.h
|
||||
endpoint_channel.h
|
||||
endpoint_channel_manager.h
|
||||
endpoint_manager.h
|
||||
internal_payload_factory.h
|
||||
medium_manager.h
|
||||
offline_service_controller.h
|
||||
p2p_cluster_pcp_handler.h
|
||||
p2p_point_to_point_pcp_handler.h
|
||||
p2p_star_pcp_handler.h
|
||||
payload_manager.h
|
||||
pcp.h
|
||||
pcp_handler.h
|
||||
pcp_manager.h
|
||||
service_controller.h
|
||||
service_controller_router.h
|
||||
wifi_lan_upgrade_handler.h
|
||||
)
|
||||
|
||||
target_link_libraries(core_internal
|
||||
PUBLIC
|
||||
absl::strings
|
||||
core_internal_mediums
|
||||
core_types
|
||||
platform_api
|
||||
platform_port_down_cast
|
||||
platform_port_string
|
||||
platform_types
|
||||
platform_utils
|
||||
proto_connections_enums_cc_proto
|
||||
proto_offline_wire_formats_cc_proto
|
||||
ukey2
|
||||
)
|
||||
|
||||
add_executable(core_internal_test
|
||||
bluetooth_device_name_test.cc
|
||||
ble_advertisement_test.cc
|
||||
)
|
||||
|
||||
add_test(
|
||||
NAME core_internal_test
|
||||
COMMAND core_internal_test
|
||||
)
|
||||
|
||||
target_link_libraries(core_internal_test
|
||||
PUBLIC
|
||||
core_internal
|
||||
gtest
|
||||
gtest_main
|
||||
platform_impl_default_cond_var
|
||||
platform_impl_default_lock
|
||||
platform_port_string
|
||||
platform_utils
|
||||
)
|
||||
|
||||
add_subdirectory(mediums)
|
||||
@@ -0,0 +1,57 @@
|
||||
add_library(core_internal_mediums STATIC)
|
||||
|
||||
target_sources(core_internal_mediums
|
||||
PRIVATE
|
||||
ble_advertisement.cc
|
||||
ble_advertisement_header.cc
|
||||
ble_packet.cc
|
||||
ble_peripheral.cc
|
||||
utils.cc
|
||||
utils.h
|
||||
PUBLIC
|
||||
advertisement_read_result.h
|
||||
ble.h
|
||||
ble_advertisement.h
|
||||
ble_advertisement_header.h
|
||||
ble_packet.h
|
||||
ble_peripheral.h
|
||||
ble_v2.h
|
||||
bloom_filter.h
|
||||
bluetooth_classic.h
|
||||
bluetooth_radio.h
|
||||
discovered_peripheral_callback.h
|
||||
discovered_peripheral_tracker.h
|
||||
lost_entity_tracker.h
|
||||
mediums.h
|
||||
uuid.h
|
||||
)
|
||||
|
||||
target_link_libraries(core_internal_mediums
|
||||
PUBLIC
|
||||
absl::numeric
|
||||
absl::strings
|
||||
platform_api
|
||||
platform_port_string
|
||||
platform_types
|
||||
platform_utils
|
||||
smhasher_murmur3
|
||||
)
|
||||
|
||||
add_executable(core_internal_mediums_test
|
||||
advertisement_read_result_test.cc
|
||||
ble_advertisement_header_test.cc
|
||||
ble_advertisement_test.cc
|
||||
ble_packet_test.cc
|
||||
bloom_filter_test.cc
|
||||
lost_entity_tracker_test.cc
|
||||
)
|
||||
|
||||
target_link_libraries(core_internal_mediums_test
|
||||
PUBLIC
|
||||
absl::time
|
||||
core_internal_mediums
|
||||
gtest
|
||||
gtest_main
|
||||
platform_impl_default
|
||||
platform_utils
|
||||
)
|
||||
Reference in New Issue
Block a user