Skip to content

Commit

Permalink
fix custom bool type for CMake builds (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavrax authored Aug 5, 2024
1 parent 532927a commit 966e078
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
21 changes: 13 additions & 8 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: c-core
schema: 1
version: "4.12.1"
version: "4.12.2"
scm: github.com/pubnub/c-core
changelog:
- date: 2024-08-05
version: v4.12.2
changes:
- type: bug
text: "Fixed custom `bool` type for CMake builds."
- date: 2024-08-05
version: v4.12.1
changes:
Expand Down Expand Up @@ -833,7 +838,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -899,7 +904,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -965,7 +970,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1027,7 +1032,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1088,7 +1093,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1144,7 +1149,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down Expand Up @@ -1197,7 +1202,7 @@ sdks:
distribution-type: source code
distribution-repository: GitHub release
package-name: C-Core
location: https://github.com/pubnub/c-core/releases/tag/v4.12.1
location: https://github.com/pubnub/c-core/releases/tag/v4.12.2
requires:
-
name: "miniz"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v4.12.2
August 05 2024

#### Fixed
- Fixed custom `bool` type for CMake builds.

## v4.12.1
August 05 2024

Expand Down
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ if(${WITH_CPP})
endif()

if(NOT ${CUSTOM_BOOL_TYPE} STREQUAL "")
message(STATUS "Using custom bool type: ${BOOL_TYPE}")
message(STATUS "Using custom bool type: ${CUSTOM_BOOL_TYPE}")
set(FLAGS "\
${FLAGS} \
-D PUBNUB_BOOL_TYPE=${BOOL_TYPE}")
-D PUBNUB_BOOL_TYPE=${CUSTOM_BOOL_TYPE}")
endif()

set(CORE_SOURCEFILES
Expand Down Expand Up @@ -502,6 +502,10 @@ if(NOT ESP_PLATFORM)

add_library(pubnub ${LIBTYPE} ${SOURCEFILES})

if(NOT ${CUSTOM_BOOL_TYPE} STREQUAL "")
target_compile_definitions(pubnub PUBLIC PUBNUB_BOOL_TYPE=${CUSTOM_BOOL_TYPE})
endif()

target_include_directories(pubnub PUBLIC
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/core
Expand Down
2 changes: 1 addition & 1 deletion core/pubnub_version_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define INC_PUBNUB_VERSION_INTERNAL


#define PUBNUB_SDK_VERSION "4.12.1"
#define PUBNUB_SDK_VERSION "4.12.2"


#endif /* !defined INC_PUBNUB_VERSION_INTERNAL */

0 comments on commit 966e078

Please sign in to comment.