diff --git a/CMakeLists.txt b/CMakeLists.txt index 8603c6a..9f3aff8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,10 +57,7 @@ add_library(BlocksRuntime src/BlocksRuntime/runtime.c) if(WIN32) - target_sources(BlocksRuntime PRIVATE - BlocksRuntime.def) - - if(NOT BUILD_SHARED_LIBS) + if (NOT BUILD_SHARED_LIBS) target_compile_definitions(BlocksRuntime PUBLIC BlocksRuntime_STATIC) target_compile_options(BlocksRuntime PUBLIC "$<$:SHELL:$<$:-Xclang >-static-libclosure>" diff --git a/src/BlocksRuntime/Block.h b/src/BlocksRuntime/Block.h index 32f27f4..d24bbdc 100644 --- a/src/BlocksRuntime/Block.h +++ b/src/BlocksRuntime/Block.h @@ -52,13 +52,8 @@ BLOCK_EXPORT void _Block_object_assign(void *, const void *, const int); BLOCK_EXPORT void _Block_object_dispose(const void *, const int); // Used by the compiler. Do not use these variables yourself. -#if defined(_WIN32) -extern void * _NSConcreteGlobalBlock[32]; -extern void * _NSConcreteStackBlock[32]; -#else BLOCK_EXPORT void * _NSConcreteGlobalBlock[32]; BLOCK_EXPORT void * _NSConcreteStackBlock[32]; -#endif #if __cplusplus } diff --git a/src/BlocksRuntime/BlocksRuntime.def b/src/BlocksRuntime/BlocksRuntime.def deleted file mode 100644 index a3b1aab..0000000 --- a/src/BlocksRuntime/BlocksRuntime.def +++ /dev/null @@ -1,4 +0,0 @@ -LIBRARY BlocksRuntime -EXPORTS - _NSConcreteGlobalBlock CONSTANT - _NSConcreteStackBlock CONSTANT diff --git a/src/BlocksRuntime/CMakeLists.txt b/src/BlocksRuntime/CMakeLists.txt deleted file mode 100644 index 2301ffe..0000000 --- a/src/BlocksRuntime/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ - -add_library(BlocksRuntime - data.c - runtime.c) -if(WIN32) - target_sources(BlocksRuntime PRIVATE - BlocksRuntime.def) - - if(NOT BUILD_SHARED_LIBS) - target_compile_definitions(BlocksRuntime PUBLIC - BlocksRuntime_STATIC) - target_compile_options(BlocksRuntime PUBLIC - "$<$:SHELL:$<$:-Xclang >-static-libclosure>" - $<$:SHELL:-Xcc -static-libclosure>) - endif() -endif() - -target_include_directories(BlocksRuntime PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}) -if(HAVE_OBJC AND CMAKE_DL_LIBS) - target_link_libraries(BlocksRuntime PUBLIC - ${CMAKE_DL_LIBS}) -endif() - -export(TARGETS BlocksRuntime - FILE cmake/export/BlocksRuntime.cmake) - -if(LINKER_SUPPORTS_BUILD_ID) - target_link_options(BlocksRuntime PRIVATE "LINKER:--build-id=sha1") -endif() - -add_library(BlocksRuntime::BlocksRuntime ALIAS BlocksRuntime) - -install(FILES Block.h - DESTINATION ${INSTALL_BLOCK_HEADERS_DIR}) -install(FILES Block_private.h - DESTINATION ${INSTALL_BLOCK_HEADERS_DIR}/BlocksRuntime) -set_property(GLOBAL APPEND PROPERTY DISPATCH_EXPORTS BlocksRuntime) -install(TARGETS BlocksRuntime - EXPORT BlocksRuntime - ARCHIVE DESTINATION ${INSTALL_TARGET_DIR} - LIBRARY DESTINATION ${INSTALL_TARGET_DIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})