-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
ros-galactic-bondcpp.win.patch
34 lines (30 loc) · 1.15 KB
/
ros-galactic-bondcpp.win.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/bondcpp/CMakeLists.txt b/bondcpp/CMakeLists.txt
index f84c947..987924a 100644
--- a/bondcpp/CMakeLists.txt
+++ b/bondcpp/CMakeLists.txt
@@ -5,9 +5,12 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
+add_definitions(-DNOMINMAX)
find_package(ament_cmake REQUIRED)
find_package(bond REQUIRED)
@@ -17,9 +20,13 @@ find_package(smclib REQUIRED)
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
-pkg_check_modules(UUID REQUIRED uuid)
-# we have to find the absolute path to uuid as target_link_directories is not available before cmake 3.13
-find_library(uuid_ABS_PATH ${UUID_LIBRARIES} PATHS ${UUID_LIBRARY_DIRS})
+if (NOT WIN32)
+ pkg_check_modules(UUID REQUIRED uuid)
+ # we have to find the absolute path to uuid as target_link_directories is not available before cmake 3.13
+ find_library(uuid_ABS_PATH ${UUID_LIBRARIES} PATHS ${UUID_LIBRARY_DIRS})
+else ()
+ set(uuid_ABS_PATH Rpcrt4.lib)
+endif ()
add_library(${PROJECT_NAME}
SHARED