Skip to content

Commit

Permalink
Update Xcode project to work with Xcode 11.3 on macOS Mojave (10.15).…
Browse files Browse the repository at this point in the history
… We no longer need boost to compile this since std::filesystem is supported now.
  • Loading branch information
codereader committed Apr 30, 2021
1 parent 6ae7c9d commit f111057
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 37 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -101,7 +101,7 @@ Install MacPorts, then open a fresh console and issue these commands:

```
sudo port install jpeg wxwidgets-3.0 pkgconfig libsigcxx2 freetype ftgl glew
sudo port install boost libxml2 freealut libvorbis libogg openal eigen3
sudo port install libxml2 freealut libvorbis libogg openal-soft eigen3
```

## Build
Expand Down Expand Up @@ -134,4 +134,4 @@ The issue tracker for DarkRadiant is also run by the Dark Mod folks: [DarkRadian
# License

The DarkRadiant source code is published under the [GNU General Public License 2.0 (GPLv2)](http://www.gnu.org/licenses/gpl-2.0.html
), except for a few libraries which are using the BSD license, see the [LICENSE](https://raw.githubusercontent.com/codereader/DarkRadiant/master/LICENSE) file for further notes.
), except for a few libraries which are using the BSD license, see the [LICENSE](https://raw.githubusercontent.com/codereader/DarkRadiant/master/LICENSE) file for further notes.
2 changes: 1 addition & 1 deletion libs/module/ApplicationContextBase.cpp
Expand Up @@ -160,7 +160,7 @@ std::string getExecutablePath(char* argv[])
{
// Success
fs::path execPath = std::string(pathBuf);
fs::path appPath = execPath.remove_leaf();
fs::path appPath = execPath.remove_filename();

rConsole() << "Application path: " << appPath << std::endl;

Expand Down
3 changes: 2 additions & 1 deletion libs/os/fs.h
Expand Up @@ -15,7 +15,8 @@

// If C++17 <filesystem> is available, use that one
// e.g. Visual Studio 2019 provides the regular C++17 header
#if defined(HAVE_STD_FILESYSTEM) || defined(__cpp_lib_filesystem) || _MSC_VER >= 1920
#if defined(HAVE_STD_FILESYSTEM) || _MSC_VER >= 1920 || \
defined(__cpp_lib_filesystem) || defined(__has_include) && __has_include(<filesystem>)

#include <filesystem>
namespace fs = std::filesystem;
Expand Down
21 changes: 12 additions & 9 deletions tools/xcode/DarkRadiant.xcodeproj/project.pbxproj
Expand Up @@ -298,6 +298,8 @@
3A01240B1E503D4D00A62BC1 /* white.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3A01232F1E503D3200A62BC1 /* white.bmp */; };
3A01240C1E503D4D00A62BC1 /* wireframe.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3A0123301E503D3200A62BC1 /* wireframe.png */; };
3A01240D1E503D4D00A62BC1 /* wireframeMode16.png in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3A0123311E503D3200A62BC1 /* wireframeMode16.png */; };
3A8D4CC0263C7895000C068E /* Bitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A8D4CBE263C7893000C068E /* Bitmap.h */; };
3A8D4CC1263C7895000C068E /* LocalBitmapArtProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A8D4CBF263C7894000C068E /* LocalBitmapArtProvider.h */; };
3AA6E07923B2343200BF9AD7 /* ParticleEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AE6F3F623B1B764008A1B2D /* ParticleEditor.cpp */; };
3AA6E08723BB4E9F00BF9AD7 /* GLWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AA6E08623BB4E9F00BF9AD7 /* GLWidget.h */; };
3AA6E08923BB4EF200BF9AD7 /* ScrollWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AA6E08823BB4EF200BF9AD7 /* ScrollWindow.h */; };
Expand Down Expand Up @@ -502,7 +504,6 @@
3AE5C26A26392C3000643850 /* tiles.ase in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3AE5C26026392BBE00643850 /* tiles.ase */; };
3AE5C26C26392C7F00643850 /* find_duplicate_entities.py in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3AE5C26B26392C6600643850 /* find_duplicate_entities.py */; };
3AE5C26D26392C9900643850 /* find_duplicate_entities.py in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3AE5C26B26392C6600643850 /* find_duplicate_entities.py */; };
3AE5C26F26392D1700643850 /* wxutil in Headers */ = {isa = PBXBuildFile; fileRef = 3AE5C26E26392D1700643850 /* wxutil */; };
3AE5C27226392D3900643850 /* FilterPopupMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AE5C27026392D3900643850 /* FilterPopupMenu.cpp */; };
3AE5C27326392D3900643850 /* FilterPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AE5C27126392D3900643850 /* FilterPopupMenu.h */; };
3AE5C29F26392DB300643850 /* DialogManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AE5C27426392D6D00643850 /* DialogManager.cpp */; };
Expand Down Expand Up @@ -2983,6 +2984,8 @@
3A01232F1E503D3200A62BC1 /* white.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; name = white.bmp; path = ../../install/bitmaps/white.bmp; sourceTree = SOURCE_ROOT; };
3A0123301E503D3200A62BC1 /* wireframe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = wireframe.png; path = ../../install/bitmaps/wireframe.png; sourceTree = SOURCE_ROOT; };
3A0123311E503D3200A62BC1 /* wireframeMode16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = wireframeMode16.png; path = ../../install/bitmaps/wireframeMode16.png; sourceTree = SOURCE_ROOT; };
3A8D4CBE263C7893000C068E /* Bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bitmap.h; path = ../../libs/wxutil/Bitmap.h; sourceTree = SOURCE_ROOT; };
3A8D4CBF263C7894000C068E /* LocalBitmapArtProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LocalBitmapArtProvider.h; path = ../../libs/wxutil/LocalBitmapArtProvider.h; sourceTree = SOURCE_ROOT; };
3AA6E08623BB4E9F00BF9AD7 /* GLWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GLWidget.h; path = ../../libs/wxutil/GLWidget.h; sourceTree = SOURCE_ROOT; };
3AA6E08823BB4EF200BF9AD7 /* ScrollWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollWindow.h; path = ../../libs/wxutil/ScrollWindow.h; sourceTree = SOURCE_ROOT; };
3AA6E08C23BB50DE00BF9AD7 /* stimresponseeditor.xrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = stimresponseeditor.xrc; path = ../../install/ui/stimresponseeditor.xrc; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -3083,7 +3086,6 @@
3AE5C25F26392BBE00643850 /* sphere.ase */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = sphere.ase; path = ../../install/resources/preview/sphere.ase; sourceTree = SOURCE_ROOT; };
3AE5C26026392BBE00643850 /* tiles.ase */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = tiles.ase; path = ../../install/resources/preview/tiles.ase; sourceTree = SOURCE_ROOT; };
3AE5C26B26392C6600643850 /* find_duplicate_entities.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; name = find_duplicate_entities.py; path = ../../install/scripts/commands/find_duplicate_entities.py; sourceTree = SOURCE_ROOT; };
3AE5C26E26392D1700643850 /* wxutil */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = wxutil; path = ../../libs/wxutil; sourceTree = SOURCE_ROOT; };
3AE5C27026392D3900643850 /* FilterPopupMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FilterPopupMenu.cpp; path = ../../libs/wxutil/menu/FilterPopupMenu.cpp; sourceTree = SOURCE_ROOT; };
3AE5C27126392D3900643850 /* FilterPopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterPopupMenu.h; path = ../../libs/wxutil/menu/FilterPopupMenu.h; sourceTree = SOURCE_ROOT; };
3AE5C27426392D6D00643850 /* DialogManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DialogManager.cpp; path = ../../radiant/ui/common/DialogManager.cpp; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -4455,7 +4457,6 @@
3AF746BC1E4FAE12003465B5 /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = ../../libs/xmlutil/Node.cpp; sourceTree = SOURCE_ROOT; };
3AF746BD1E4FAE12003465B5 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = ../../libs/xmlutil/Node.h; sourceTree = SOURCE_ROOT; };
3AF746BE1E4FAE12003465B5 /* XPathException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPathException.h; path = ../../libs/xmlutil/XPathException.h; sourceTree = SOURCE_ROOT; };
3AF746C81E4FAF3D003465B5 /* boost.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = boost.xcconfig; sourceTree = "<group>"; };
3AFF03E724548619002B1472 /* ikeyvaluestore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ikeyvaluestore.h; path = ../../include/ikeyvaluestore.h; sourceTree = SOURCE_ROOT; };
3AFF03E824548655002B1472 /* DialogBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DialogBase.cpp; sourceTree = "<group>"; };
3AFF03EA245489BF002B1472 /* SetObjectSelectionByFilterWalker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SetObjectSelectionByFilterWalker.h; path = ../../radiantcore/filters/SetObjectSelectionByFilterWalker.h; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -4816,7 +4817,8 @@
3A011FC41E50275700A62BC1 /* wxutil */ = {
isa = PBXGroup;
children = (
3AE5C26E26392D1700643850 /* wxutil */,
3A8D4CBE263C7893000C068E /* Bitmap.h */,
3A8D4CBF263C7894000C068E /* LocalBitmapArtProvider.h */,
3AC88A9A25BC100900E6CCCE /* dataview */,
3AC88A702596F68D00E6CCCE /* fsview */,
3AFF0633253AE829002B1472 /* Button.h */,
Expand Down Expand Up @@ -5236,7 +5238,6 @@
isa = PBXGroup;
children = (
3AEDE3CD1E4F04BD005A8641 /* base.xcconfig */,
3AF746C81E4FAF3D003465B5 /* boost.xcconfig */,
3AEDE3CB1E4EEEDF005A8641 /* DarkRadiant.xcconfig */,
3AFF0467253AB775002B1472 /* DarkRadiantCore.xcconfig */,
3AEBE49D1E50E41F0062D9AF /* dm.editing.xcconfig */,
Expand Down Expand Up @@ -6601,9 +6602,9 @@
3AEDE39B1E4EEA1F005A8641 /* DarkRadiant */ = {
isa = PBXGroup;
children = (
3AC88791253C24BA00E6CCCE /* clipboard */,
3AFF0604253AE741002B1472 /* ApplicationContext.h */,
3AF743371E4F861A003465B5 /* camera */,
3AC88791253C24BA00E6CCCE /* clipboard */,
3AE6F328239F4E46008A1B2D /* eventmanager */,
3AF743611E4F861A003465B5 /* log */,
3AF743741E4F861A003465B5 /* main.cpp */,
Expand Down Expand Up @@ -8201,9 +8202,11 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
3A8D4CC1263C7895000C068E /* LocalBitmapArtProvider.h in Headers */,
3AE5C27326392D3900643850 /* FilterPopupMenu.h in Headers */,
3A0120331E50278400A62BC1 /* DirChooser.h in Headers */,
3AE6F1E81FD1A529008A1B2D /* GuiView.h in Headers */,
3A8D4CC0263C7895000C068E /* Bitmap.h in Headers */,
3AC88AAD25BC102500E6CCCE /* IResourceTreePopulator.h in Headers */,
3A0120381E50278400A62BC1 /* FileChooser.h in Headers */,
3A0120521E50278400A62BC1 /* PanedPosition.h in Headers */,
Expand All @@ -8218,7 +8221,6 @@
3A0120211E50278400A62BC1 /* ChoiceHelper.h in Headers */,
3A01203A1E50278400A62BC1 /* FreezePointer.h in Headers */,
3A01203F1E50278400A62BC1 /* IConv.h in Headers */,
3AE5C26F26392D1700643850 /* wxutil in Headers */,
3A01205F1E50278400A62BC1 /* SourceView.h in Headers */,
3A01205A1E50278400A62BC1 /* RenderPreview.h in Headers */,
3A0120561E50278400A62BC1 /* ModelPreview.h in Headers */,
Expand Down Expand Up @@ -9115,6 +9117,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 3ADBCC681E4E4B7C00CA94F6;
Expand Down Expand Up @@ -10369,15 +10372,15 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 3AEDE3CD1E4F04BD005A8641 /* base.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.15;
};
name = Debug;
};
3ADBCC6E1E4E4B7C00CA94F6 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3AEDE3CD1E4F04BD005A8641 /* base.xcconfig */;
buildSettings = {
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.15;
};
name = Release;
};
Expand Down
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Expand Up @@ -559,8 +559,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -570,8 +568,8 @@
ReferencedContainer = "container:DarkRadiant.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
Expand All @@ -593,8 +591,6 @@
ReferencedContainer = "container:DarkRadiant.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
14 changes: 7 additions & 7 deletions tools/xcode/base.xcconfig
Expand Up @@ -7,14 +7,13 @@
//
#include "sigc++.xcconfig"
#include "libxml2.xcconfig"
#include "boost.xcconfig"
#include "wxwidgets.xcconfig"
#include "eigen3.xcconfig"

DR_BASE_CPLUSPLUSFLAGS = $(BOOST_OTHER_CPLUSPLUSFLAGS) $(WXWIDGETS_OTHER_CPLUSPLUSFLAGS) "-DPOSIX" "-Wno-potentially-evaluated-expression" "-Wno-documentation" "-DFMT_HEADER_ONLY" "-DDR_MODULES_NEXT_TO_APP"
DR_BASE_HEADER_SEARCH_PATHS = $(LIBXML2_HEADER_SEARCH_PATHS) $(SIGCPP_HEADER_SEARCH_PATHS) $(BOOST_HEADER_SEARCH_PATHS) $(WXWIDGETS_HEADER_SEARCH_PATHS) $(EIGEN_HEADER_SEARCH_PATHS) "$(SRCROOT)/../../include" "$(SRCROOT)/../../libs" "$(SRCROOT)/../../libs/libfmt"
DR_BASE_LIBRARY_SEARCH_PATHS = $(BOOST_LIBRARY_SEARCH_PATHS) $(LIBXML2_LIBRARY_SEARCH_PATHS) $(SIGCPP_LIBRARY_SEARCH_PATHS) $(WXWIDGETS_LIBRARY_SEARCH_PATHS)
DR_BASE_LINKFLAGS = $(BOOST_LINKFLAGS) $(LIBXML2_LINKFLAGS) $(SIGCPP_LINKFLAGS) $(WXWIDGETS_LINKFLAGS)
DR_BASE_CPLUSPLUSFLAGS = $(WXWIDGETS_OTHER_CPLUSPLUSFLAGS) "-DPOSIX" "-Wno-potentially-evaluated-expression" "-Wno-documentation" "-DFMT_HEADER_ONLY" "-DDR_MODULES_NEXT_TO_APP"
DR_BASE_HEADER_SEARCH_PATHS = $(LIBXML2_HEADER_SEARCH_PATHS) $(SIGCPP_HEADER_SEARCH_PATHS) $(WXWIDGETS_HEADER_SEARCH_PATHS) $(EIGEN_HEADER_SEARCH_PATHS) "$(SRCROOT)/../../include" "$(SRCROOT)/../../libs" "$(SRCROOT)/../../libs/libfmt"
DR_BASE_LIBRARY_SEARCH_PATHS = $(LIBXML2_LIBRARY_SEARCH_PATHS) $(SIGCPP_LIBRARY_SEARCH_PATHS) $(WXWIDGETS_LIBRARY_SEARCH_PATHS)
DR_BASE_LINKFLAGS = $(LIBXML2_LINKFLAGS) $(SIGCPP_LINKFLAGS) $(WXWIDGETS_LINKFLAGS)

// Apply the basic set for the targets just using base alone
OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS) $(DR_BASE_CPLUSPLUSFLAGS)
Expand All @@ -27,5 +26,6 @@ FRAMEWORK_SEARCH_PATHS = "/System/Library/Frameworks"
// Some headers are named the same, we don't want Xcode to decide which one will be included
USE_HEADERMAP = NO

// Use the regular C++14 standard
CLANG_CXX_LANGUAGE_STANDARD = c++14
// Use the regular C++17 standard
CLANG_CXX_LANGUAGE_STANDARD = c++17
CLANG_CXX_LIBRARY = libc++
11 changes: 0 additions & 11 deletions tools/xcode/boost.xcconfig

This file was deleted.

0 comments on commit f111057

Please sign in to comment.