@@ -0,0 +1,53 @@
1+diff --git a/CMakeLists.txt b/CMakeLists.txt
2+index 5ed8020c..44ca43e7 100644
3+--- a/CMakeLists.txt
4++++ b/CMakeLists.txt
5+@@ -2,12 +2,20 @@ cmake_minimum_required(VERSION 3.16)
6+ project(deltachat LANGUAGES C)
7+ include(GNUInstallDirs)
8+
9++if(APPLE)
10++ set(DYNAMIC_EXT "dylib")
11++elseif(UNIX)
12++ set(DYNAMIC_EXT "so")
13++else()
14++ set(DYNAMIC_EXT "dll")
15++endif()
16++
17+ find_program(CARGO cargo)
18+
19+ add_custom_command(
20+ OUTPUT
21+ "target/release/libdeltachat.a"
22+- "target/release/libdeltachat.so"
23++ "target/release/libdeltachat.${DYNAMIC_EXT}"
24+ "target/release/pkgconfig/deltachat.pc"
25+ COMMAND
26+ PREFIX=${CMAKE_INSTALL_PREFIX}
27+@@ -32,11 +40,11 @@ add_custom_target(
28+ ALL
29+ DEPENDS
30+ "target/release/libdeltachat.a"
31+- "target/release/libdeltachat.so"
32++ "target/release/libdeltachat.${DYNAMIC_EXT}"
33+ "target/release/pkgconfig/deltachat.pc"
34+ )
35+
36+ install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
37+ install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
38+-install(FILES "target/release/libdeltachat.so" DESTINATION ${CMAKE_INSTALL_LIBDIR})
39++install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
40+ install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
41+diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py
42+index c8ed43e2..714c7e30 100755
43+--- a/python/install_python_bindings.py
44++++ b/python/install_python_bindings.py
45+@@ -24,7 +24,7 @@
46+
47+ print("running:", " ".join(cmd))
48+ subprocess.check_call(cmd)
49+- subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)
50++ subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib" , shell=True)
51+
52+ if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
53+ subprocess.check_call([