Skip to content

Commit 0c34941

Browse files
committed
add libobjc2 CMake patch
1 parent ec2f500 commit 0c34941

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 3f07337..32d009c 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -245,6 +245,7 @@ else ()
6+
find_library(BLOCKS_RUNTIME_LIBRARY BlocksRuntime)
7+
if (BLOCKS_RUNTIME_LIBRARY)
8+
set(CMAKE_REQUIRED_LIBRARIES ${BLOCKS_RUNTIME_LIBRARY})
9+
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INSTALL_PREFIX}/include)
10+
check_symbol_exists(_Block_use_RR2 "Block_private.h" HAVE_BLOCK_USE_RR2)
11+
if (HAVE_BLOCK_USE_RR2)
12+
add_definitions(-DHAVE_BLOCK_USE_RR2)
13+
@@ -271,6 +272,11 @@ if (WIN32 AND NOT MINGW)
14+
endif()
15+
16+
target_link_libraries(objc PRIVATE tsl::robin_map)
17+
+target_include_directories(
18+
+ objc
19+
+ PRIVATE
20+
+ ${CMAKE_INSTALL_PREFIX}/include
21+
+)
22+
23+
set_target_properties(objc PROPERTIES
24+
LINKER_LANGUAGE C

0 commit comments

Comments
 (0)