Add missing /usr/local/ include search path for macOS XCode build #916
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I'd been trying to find a precompiled package or nomacs installer for macOS. All I could find is a ports formula for macPorts. Since I didn't find a Homebrew package, I went to Github and found that your repository has macOS compilation instructions.
I followed them and was able to get CMake configured, save for minor warnings about quazip and HEIF support being disabled. However, when I would execute
make
, I would get the following:I did some digging around, and I found that Homebrew on x86 macOS links all the packages' private ${pkg}/include directories to /usr/local/include. I then peeked at the CMakeLists file to find out how the Qt5 include paths are prepended to the search path, and did the same for /usr/local/include. (See the code change, its super simple)
That allowed the compilation to find all the dependency headers. It still spat out some QT warnings about deprecated APIs, but it completed with no issue after that, and I got a nomacs binary.
Please forgive me if I've missed something about the code of conduct or the contribution guide. I figured that the fix is so simple, I wanted to submit it before I moved on to work and other side projects, haha..
I haven't quite verified that this CI will pass your travis configuration, but I'm looking into it. I thought Travis could be configured to automatically compile pull requests, but it's been a long time since I've used travis for CI, so, please bare with me.
Hopefully this will help other macOS users. 😅
Please check the following before submitting a pull request:
master
also have a look at our CONTRIBUTING.md