From a900ef145d7700e66d2badf97b4c369f798907b6 Mon Sep 17 00:00:00 2001 From: Akash Munagala Date: Tue, 16 Nov 2021 14:56:08 -0600 Subject: [PATCH 1/2] Fix FindZMQ on Windows Use vcpkg target --- cmake/FindZMQ.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/FindZMQ.cmake b/cmake/FindZMQ.cmake index b0ae5dda..8f518607 100644 --- a/cmake/FindZMQ.cmake +++ b/cmake/FindZMQ.cmake @@ -13,6 +13,13 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # +find_package(ZeroMQ CONFIG REQUIRED) +if(TARGET libzmq) + add_library(zmq ALIAS libzmq) + set(ZMQ_FOUND TRUE) + return() +endif() + if (ZMQ_LIBRARIES AND ZMQ_INCLUDE_DIRS) # in cache already set(ZMQ_FOUND TRUE) From 4d826fd7b5afcd13ff42aa2b76e2633132527821 Mon Sep 17 00:00:00 2001 From: Akash Munagala Date: Tue, 16 Nov 2021 15:05:03 -0600 Subject: [PATCH 2/2] Fix Windows build Export symbols and manual visibility for static members --- CMakeLists.txt | 6 ++++++ bt_editor/sidepanel_editor.h | 4 +++- bt_editor/sidepanel_replay.h | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e83b8c0..0189e737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,12 @@ add_library(behavior_tree_editor SHARED ${APP_CPPS} ${FORMS_HEADERS} ) +set_target_properties(behavior_tree_editor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) +include(GenerateExportHeader) +generate_export_header(behavior_tree_editor) +target_include_directories(behavior_tree_editor PUBLIC + $ +) SET(GROOT_DEPENDENCIES QtNodeEditor ) diff --git a/bt_editor/sidepanel_editor.h b/bt_editor/sidepanel_editor.h index 8897d4bc..20dcb07a 100644 --- a/bt_editor/sidepanel_editor.h +++ b/bt_editor/sidepanel_editor.h @@ -7,11 +7,13 @@ #include #include "XML_utilities.hpp" +#include "behavior_tree_editor_export.h" + namespace Ui { class SidepanelEditor; } -class SidepanelEditor : public QFrame +class BEHAVIOR_TREE_EDITOR_EXPORT SidepanelEditor : public QFrame { Q_OBJECT diff --git a/bt_editor/sidepanel_replay.h b/bt_editor/sidepanel_replay.h index aa0de1bf..6512a195 100644 --- a/bt_editor/sidepanel_replay.h +++ b/bt_editor/sidepanel_replay.h @@ -7,12 +7,14 @@ #include #include "bt_editor_base.h" +#include "behavior_tree_editor_export.h" + namespace Ui { class SidepanelReplay; } -class SidepanelReplay : public QFrame +class BEHAVIOR_TREE_EDITOR_EXPORT SidepanelReplay : public QFrame { Q_OBJECT