-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cps: move platform abstractions out of search.cpp
These will be useful outside of the cps search module.
- Loading branch information
Showing
5 changed files
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright © 2024 Dylan Baker | ||
|
||
#include "cps/platform.hpp" | ||
|
||
namespace cps::platform { | ||
|
||
fs::path libdir() { return "lib"; } | ||
|
||
fs::path datadir() { return "share"; } | ||
|
||
} // namespace cps::platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright © 2024 Dylan Baker | ||
|
||
#include <filesystem> | ||
|
||
namespace cps::platform { | ||
|
||
namespace fs = std::filesystem; | ||
|
||
/// @brief Get the platform specific location that libraries are installed in | ||
/// @return A path segment for libraries to be installed in, relative to a prefix | ||
fs::path libdir(); | ||
|
||
/// @brief Get the platform specific location to install architecture agnostic data to | ||
/// @return A path segment for data to be installed in, relative to a prefix | ||
fs::path datadir(); | ||
|
||
} // namespace cps::platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters