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

fix custom bool type for CMake builds #193

Merged
merged 4 commits into from
Aug 5, 2024
Merged
Changes from 3 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
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
Loading