Skip to content
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.5.5](https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.5.4...v0.5.5)

### Changed
- Allow building without a SONAME

## [0.5.4](https://github.com/rdkcentral/firebolt-cpp-client/compare/v0.5.3...v0.5.4)

### Fixed
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option(DISCOVER_UT "Discover all Unit Tests" ON)
option(DISCOVER_CT "Discover all Component Tests" OFF)
option(ENABLE_DEMO_APP "Build demo app" OFF)
option(BUILD_WITH_INSTALLED_TRANSPORT "Build the library with the transport that is installed, even if its version mismatches" ON)
option(DISABLE_SO_VERSION "Disable SONAME/SOVERSION of shared library" OFF)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${SYSROOT_PATH}/usr" CACHE INTERNAL "" FORCE)
Expand Down
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,21 @@ while [[ ! -z $1 ]]; do
esac; shift
done

[ ! -z $SYSROOT_PATH ] || { echo "SYSROOT_PATH not set" >/dev/stderr; exit 1; }
[ -e $SYSROOT_PATH ] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }
[[ ! -z $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not set" >/dev/stderr; exit 1; }
[[ -e $SYSROOT_PATH ]] || { echo "SYSROOT_PATH not exist ($SYSROOT_PATH)" >/dev/stderr; exit 1; }

$cleanFirst && rm -rf $bdir

if [ ! -e "$bdir" ]; then
if [[ ! -e "$bdir" || -n "$@" ]]; then
params+=" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
command -v ccache >/dev/null 2>&1 && params+=" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
cmake -B $bdir \
-DCMAKE_BUILD_TYPE=$buildType \
-DSYSROOT_PATH=$SYSROOT_PATH \
$params \
"$@" || exit $?
fi
cmake --build $bdir --parallel || exit $?
if $do_install && [ $bdir = 'build' ]; then
if $do_install && [[ $bdir == 'build' ]]; then
cmake --install $bdir || exit $?
fi
16 changes: 13 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ target_link_libraries(${TARGET}
PRIVATE
nlohmann_json::nlohmann_json
PUBLIC
$<IF:$<TARGET_EXISTS:FireboltTransport::FireboltTransport>,FireboltTransport::FireboltTransport,FireboltTransport>
FireboltTransport::FireboltTransport
)

target_include_directories(${TARGET}
Expand All @@ -69,10 +69,20 @@ target_include_directories(${TARGET}
set_target_properties(${TARGET} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED YES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
POSITION_INDEPENDENT_CODE ON
)
if(DISABLE_SO_VERSION)
set_target_properties(${TARGET} PROPERTIES
NO_SONAME ON
VERSION ""
SOVERSION ""
)
else()
set_target_properties(${TARGET} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)
endif()

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ target_link_options(${UNIT_TESTS_APP} PRIVATE --coverage)
target_link_libraries(${UNIT_TESTS_APP}
PRIVATE
FireboltClient
$<IF:$<TARGET_EXISTS:FireboltTransport::FireboltTransport>,FireboltTransport::FireboltTransport,FireboltTransport>
FireboltTransport::FireboltTransport
nlohmann_json::nlohmann_json
nlohmann_json_schema_validator::validator
GTest::gtest
Expand Down Expand Up @@ -86,7 +86,7 @@ add_executable(${COMPONENT_TESTS_APP}
target_link_libraries(${COMPONENT_TESTS_APP}
PRIVATE
FireboltClient
$<IF:$<TARGET_EXISTS:FireboltTransport::FireboltTransport>,FireboltTransport::FireboltTransport,FireboltTransport>
FireboltTransport::FireboltTransport
nlohmann_json::nlohmann_json
nlohmann_json_schema_validator::validator
CURL::libcurl
Expand Down
Loading