Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add macOS support #135

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

Merged
merged 1 commit into from
Mar 1, 2020
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
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if( ZMQ_FOUND )
message(STATUS "ZeroMQ found.")
add_definitions( -DZMQ_FOUND )
list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp)
list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES zmq)
list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES ${ZMQ_LIBRARIES})
else()
message(WARNING "ZeroMQ NOT found. Skipping the build of [PublisherZMQ] and [bt_recorder].")
endif()
Expand Down Expand Up @@ -174,6 +174,10 @@ if (WIN32)
add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE} )
endif()

if( ZMQ_FOUND )
list(APPEND BUILD_TOOL_INCLUDE_DIRS ${ZMQ_INCLUDE_DIRS})
endif()

target_link_libraries(${BEHAVIOR_TREE_LIBRARY} PUBLIC
${BEHAVIOR_TREE_EXTERNAL_LIBRARIES})

Expand Down Expand Up @@ -233,5 +237,3 @@ if( BUILD_EXAMPLES )
add_subdirectory(sample_nodes)
add_subdirectory(examples)
endif()


2 changes: 1 addition & 1 deletion include/behaviortree_cpp_v3/bt_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ See examples for more information about configuring CMake correctly

#else

#ifdef __linux__
#if defined(__linux__) || defined __APPLE__

#define BT_REGISTER_NODES(factory) \
extern "C" void __attribute__((visibility("default"))) \
Expand Down
6 changes: 3 additions & 3 deletions src/basic_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ double convertFromString<double>(StringView str)
// see issue #120
// http://quick-bench.com/DWaXRWnxtxvwIMvZy2DxVPEKJnE

const auto old_locale = std::setlocale(LC_NUMERIC,nullptr);
std::setlocale(LC_NUMERIC,"C");
const auto old_locale = setlocale(LC_NUMERIC,nullptr);
setlocale(LC_NUMERIC,"C");
double val = std::stod(str.data());
std::setlocale(LC_NUMERIC,old_locale);
setlocale(LC_NUMERIC,old_locale);
return val;
}

Expand Down