Skip to content

Commit

Permalink
Cxx-qt-build: Allow specifying an "Interface"
Browse files Browse the repository at this point in the history
This allows exactly specifying what to export to downstream
dependencies.
  • Loading branch information
LeonMatthesKDAB authored and ahayzen-kdab committed Jul 9, 2024
1 parent 9698d4d commit ce55805
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 158 deletions.
6 changes: 3 additions & 3 deletions crates/cxx-qt-build/src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{crate_name, module_name_from_uri};
use std::{env, path::PathBuf};

/// The target directory, namespaced by crate
pub fn crate_target() -> PathBuf {
pub(crate) fn crate_target() -> PathBuf {
target().join("crates").join(crate_name())
}

Expand Down Expand Up @@ -46,9 +46,9 @@ pub(crate) fn export() -> Option<PathBuf> {
env::var("CXXQT_EXPORT_DIR").ok().map(PathBuf::from)
}

/// The include directory needs to be namespaced by crate name when exporting for a C++ build system,
/// The include directory is namespaced by crate name when exporting for a C++ build system,
/// but for using cargo build without a C++ build system, OUT_DIR is already namespaced by crate name.
pub fn header_root() -> PathBuf {
pub(crate) fn header_root() -> PathBuf {
crate_target().join("include")
}

Expand Down
Loading

0 comments on commit ce55805

Please sign in to comment.