Commit 3861afacf52f911f49a143088e8172a87b2c9ec2

Wohlstand 2021-12-18T17:14:32

Fixed build on CMake older than 3.13 Fixes #5096

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/cmake/macros.cmake b/cmake/macros.cmake
index 090ffa0..84cb4c6 100644
--- a/cmake/macros.cmake
+++ b/cmake/macros.cmake
@@ -92,7 +92,6 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
   endforeach()
 endmacro()
 
-
 macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
   set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
   set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
@@ -100,3 +99,8 @@ macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
   set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
 endmacro()
 
+if(CMAKE_VERSION VERSION_LESS 3.13.0)
+  macro(target_link_directories _TARGET _SCOPE)
+    link_directories(${ARGN})
+  endmacro()
+endif()