mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
dynamic libraries use dylib extension on Darwin
This commit is contained in:
committed by
holger krekel
parent
f581ecc805
commit
969508ae36
@@ -4,10 +4,18 @@ include(GNUInstallDirs)
|
|||||||
|
|
||||||
find_program(CARGO cargo)
|
find_program(CARGO cargo)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
set(DYNAMIC_EXT "dylib")
|
||||||
|
elseif(UNIX)
|
||||||
|
set(DYNAMIC_EXT "so")
|
||||||
|
else()
|
||||||
|
set(DYNAMIC_EXT "dll")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
"target/release/libdeltachat.a"
|
"target/release/libdeltachat.a"
|
||||||
"target/release/libdeltachat.so"
|
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||||
"target/release/pkgconfig/deltachat.pc"
|
"target/release/pkgconfig/deltachat.pc"
|
||||||
COMMAND
|
COMMAND
|
||||||
PREFIX=${CMAKE_INSTALL_PREFIX}
|
PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||||
@@ -32,11 +40,11 @@ add_custom_target(
|
|||||||
ALL
|
ALL
|
||||||
DEPENDS
|
DEPENDS
|
||||||
"target/release/libdeltachat.a"
|
"target/release/libdeltachat.a"
|
||||||
"target/release/libdeltachat.so"
|
"target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||||
"target/release/pkgconfig/deltachat.pc"
|
"target/release/pkgconfig/deltachat.pc"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(FILES "target/release/libdeltachat.so" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
print("running:", " ".join(cmd))
|
print("running:", " ".join(cmd))
|
||||||
subprocess.check_call(cmd)
|
subprocess.check_call(cmd)
|
||||||
subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)
|
subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib src/deltachat/*.dll" , shell=True)
|
||||||
|
|
||||||
if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
|
if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
|
|||||||
Reference in New Issue
Block a user