mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
allow installing lib and include under different prefixes
This commit is contained in:
@@ -8,7 +8,11 @@ add_custom_command(
|
|||||||
"target/release/libdeltachat.a"
|
"target/release/libdeltachat.a"
|
||||||
"target/release/libdeltachat.so"
|
"target/release/libdeltachat.so"
|
||||||
"target/release/pkgconfig/deltachat.pc"
|
"target/release/pkgconfig/deltachat.pc"
|
||||||
COMMAND PREFIX=${CMAKE_INSTALL_PREFIX} ${CARGO} build --release --no-default-features
|
COMMAND
|
||||||
|
PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||||
|
LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
||||||
|
INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
||||||
|
${CARGO} build --release --no-default-features
|
||||||
|
|
||||||
# Build in `deltachat-ffi` directory instead of using
|
# Build in `deltachat-ffi` directory instead of using
|
||||||
# `--package deltachat_ffi` to avoid feature resolver version
|
# `--package deltachat_ffi` to avoid feature resolver version
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ fn main() {
|
|||||||
url = env::var("CARGO_PKG_HOMEPAGE").unwrap_or_else(|_| "".to_string()),
|
url = env::var("CARGO_PKG_HOMEPAGE").unwrap_or_else(|_| "".to_string()),
|
||||||
version = env::var("CARGO_PKG_VERSION").unwrap(),
|
version = env::var("CARGO_PKG_VERSION").unwrap(),
|
||||||
libs_priv = libs_priv,
|
libs_priv = libs_priv,
|
||||||
prefix = env::var("PREFIX").unwrap_or_else(|_| "/usr/local".to_string()),
|
prefix = env::var("PREFIX").unwrap(),
|
||||||
|
libdir = env::var("LIBDIR").unwrap(),
|
||||||
|
includedir = env::var("INCLUDEDIR").unwrap(),
|
||||||
);
|
);
|
||||||
|
|
||||||
fs::create_dir_all(target_path.join("pkgconfig")).unwrap();
|
fs::create_dir_all(target_path.join("pkgconfig")).unwrap();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
prefix={prefix}
|
prefix={prefix}
|
||||||
libdir=${{prefix}}/lib
|
libdir={libdir}
|
||||||
includedir=${{prefix}}/include
|
includedir={includedir}
|
||||||
|
|
||||||
Name: {name}
|
Name: {name}
|
||||||
Description: {description}
|
Description: {description}
|
||||||
|
|||||||
Reference in New Issue
Block a user