@@ -51,7 +51,7 @@ pf_info collect_pf_sources(path_ref path) { | |||
library library::from_directory(path_ref lib_dir, std::string_view name) { | |||
auto [sources, inc_dir, src_dir] = collect_pf_sources(lib_dir); | |||
auto lib = library(name, std::move(sources));; | |||
auto lib = library(lib_dir, name, std::move(sources)); | |||
if (fs::exists(inc_dir)) { | |||
lib._pub_inc_dir = inc_dir; | |||
@@ -59,7 +59,7 @@ library library::from_directory(path_ref lib_dir, std::string_view name) { | |||
lib._priv_inc_dir = src_dir; | |||
} | |||
} else { | |||
lib._pub_inc_dir = src_dir; | |||
lib._pub_inc_dir = src_dir; | |||
lib._priv_inc_dir = src_dir; | |||
} | |||
@@ -13,13 +13,15 @@ struct library_ident { | |||
}; | |||
class library { | |||
fs::path _base_dir; | |||
std::string _name; | |||
source_list _sources; | |||
fs::path _pub_inc_dir; | |||
fs::path _priv_inc_dir; | |||
library(std::string_view name, source_list&& src) | |||
: _name(name) | |||
library(path_ref dir, std::string_view name, source_list&& src) | |||
: _base_dir(dir) | |||
, _name(name) | |||
, _sources(std::move(src)) {} | |||
public: | |||
@@ -28,6 +30,7 @@ public: | |||
return from_directory(path, path.filename().string()); | |||
} | |||
path_ref base_dir() const noexcept { return _base_dir; } | |||
path_ref public_include_dir() const noexcept { return _pub_inc_dir; } | |||
path_ref private_include_dir() const noexcept { return _priv_inc_dir; } | |||