Skip to content

Commit

Permalink
fixing ci
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <[email protected]>
  • Loading branch information
Andrey1994 committed Dec 26, 2024
1 parent d915dac commit d6600da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/board_controller/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ add_library (
${BOARD_CONTROLLER_SRC}
)

if (ANDROID AND BUILD_BLE)
target_compile_definitions (${BOARD_CONTROLLER_NAME} PRIVATE STATIC_SIMPLEBLE)
target_link_libraries (${BOARD_CONTROLLER_NAME} PRIVATE simpleble-c)
endif (ANDROID AND BUILD_BLE)
#if (ANDROID AND BUILD_BLE)
# target_compile_definitions (${BOARD_CONTROLLER_NAME} PRIVATE STATIC_SIMPLEBLE)
# target_link_libraries (${BOARD_CONTROLLER_NAME} PRIVATE simpleble-c)
#endif (ANDROID AND BUILD_BLE)

target_include_directories (
${BOARD_CONTROLLER_NAME} PRIVATE
Expand Down
23 changes: 10 additions & 13 deletions third_party/SimpleBLE/simpleble/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ add_library(simpleble ${SIMPLEBLE_SRC})
if(ANDROID)
add_library(simpleble-c STATIC ${SIMPLEBLE_C_SRC})
else(ANDROID)
add_library(simpleble-c SHARED ${SIMPLEBLE_C_SRC})
add_library(${SIMPLEBLE-C} SHARED ${SIMPLEBLE_C_SRC})
endif(ANDROID)

add_library(simpleble::simpleble ALIAS simpleble)
add_library(simpleble::simpleble-c ALIAS simpleble-c)

set_target_properties(simpleble PROPERTIES
CXX_VISIBILITY_PRESET hidden
Expand All @@ -109,7 +108,7 @@ set_target_properties(simpleble PROPERTIES
MINSIZEREL_POSTFIX "-minsizerel"
DEBUG_POSTFIX "")

set_target_properties(simpleble-c PROPERTIES
set_target_properties(${SIMPLEBLE-C} PROPERTIES
C_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN YES
CXX_STANDARD 17
Expand All @@ -119,8 +118,6 @@ set_target_properties(simpleble-c PROPERTIES
DEFINE_SYMBOL simpleble_EXPORTS # Use the same symbol as simpleble
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}"
EXPORT_NAME simpleble-c
OUTPUT_NAME simpleble-c
RELEASE_POSTFIX ""
RELWITHDEBINFO_POSTFIX "-relwithdebinfo"
MINSIZEREL_POSTFIX "-minsizerel"
Expand All @@ -132,26 +129,26 @@ set_target_properties(simpleble-c PROPERTIES

# Configure include directories
target_include_directories(simpleble PRIVATE ${SIMPLEBLE_PRIVATE_INCLUDES})
target_include_directories(simpleble-c PRIVATE ${SIMPLEBLE_PRIVATE_INCLUDES})
target_include_directories(${SIMPLEBLE-C} PRIVATE ${SIMPLEBLE_PRIVATE_INCLUDES})

target_include_directories(simpleble INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../external/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_include_directories(simpleble-c INTERFACE
target_include_directories(${SIMPLEBLE-C} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

target_include_directories(simpleble SYSTEM PUBLIC
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/export>)

target_include_directories(simpleble-c SYSTEM PUBLIC
target_include_directories(${SIMPLEBLE-C} SYSTEM PUBLIC
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/export>)

# Configure linked libraries
target_link_libraries(simpleble PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
target_link_libraries(simpleble-c PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
target_link_libraries(simpleble-c PRIVATE simpleble::simpleble)
target_link_libraries(${SIMPLEBLE-C} PRIVATE $<BUILD_INTERFACE:fmt::fmt-header-only>)
target_link_libraries(${SIMPLEBLE-C} PRIVATE simpleble::simpleble)

append_sanitize_options("${SIMPLEBLE_SANITIZE}")

Expand Down Expand Up @@ -241,7 +238,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
${CMAKE_CURRENT_SOURCE_DIR}/src/backends/linux)

set_property(TARGET simpleble PROPERTY INSTALL_RPATH $ORIGIN)
set_property(TARGET simpleble-c PROPERTY INSTALL_RPATH $ORIGIN)
set_property(TARGET ${SIMPLEBLE-C} PROPERTY INSTALL_RPATH $ORIGIN)

elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
message(STATUS "Windows Host Detected")
Expand Down Expand Up @@ -292,7 +289,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
${CMAKE_CURRENT_SOURCE_DIR}/src/backends/macos/PeripheralBaseMacOS.mm)

set_property(TARGET simpleble PROPERTY INSTALL_RPATH @loader_path)
set_property(TARGET simpleble-c PROPERTY INSTALL_RPATH @loader_path)
set_property(TARGET ${SIMPLEBLE-C} PROPERTY INSTALL_RPATH @loader_path)

elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
message(STATUS "Configuring for Android")
Expand Down Expand Up @@ -337,7 +334,7 @@ apply_build_options(simpleble
"${PRIVATE_LINK_OPTIONS}"
"${PUBLIC_LINK_OPTIONS}")

apply_build_options(simpleble-c
apply_build_options(${SIMPLEBLE-C}
"${PRIVATE_COMPILE_DEFINITIONS}"
"${PRIVATE_COMPILE_OPTIONS}"
"${PRIVATE_LINK_OPTIONS}"
Expand Down

0 comments on commit d6600da

Please sign in to comment.