-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DEFAULT_ADDITIONAL_DIRS CMake option
The main motivation behind this change is to make it easier to package Descent 3 for Linux. For example, let’s say that you’re packaging Descent 3 for Debian and you want to make the package work well with Debian’s game-data-packager. The package for the Descent 3 engine will put d3-linux.hog in one directory, and the package for the proprietary Descent 3 game data will put d3.hog into a different directory [1]. The Descent 3 engine package can use the DEFAULT_ADDITIONAL_DIRS CMake option in order to make sure that both d3-linux.hog and d3.hog are located automatically. For the example value in USAGE.md, I decided to use Windows paths in order to showcase the fact that you have to escape backslashes. [1]: <#373 (comment)>
- Loading branch information
1 parent
d143d08
commit feb6085
Showing
8 changed files
with
116 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
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
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
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,23 @@ | ||
/* | ||
* Descent 3 | ||
* Copyright (C) 2024 Descent Developers | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include <filesystem> | ||
#include <initializer_list> | ||
|
||
#include "default_base_directories.h" | ||
|
||
const std::initializer_list<std::filesystem::path> Default_read_only_base_directories = @DEFAULT_ADDITIONAL_DIRS@; |
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,26 @@ | ||
/* | ||
* Descent 3 | ||
* Copyright (C) 2024 Descent Developers | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef DEFAULT_ADDITIONAL_DIRECTORIES_H | ||
#define DEFAULT_ADDITIONAL_DIRECTORIES_H | ||
|
||
#include <filesystem> | ||
#include <initializer_list> | ||
|
||
extern const std::initializer_list<std::filesystem::path> Default_read_only_base_directories; | ||
|
||
#endif |