Martchus / cpp-utilities

Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
GNU General Public License v2.0
52 stars 18 forks source link

Fix building with Xcode #12

Closed yan12125 closed 5 years ago

yan12125 commented 5 years ago

With this additional line, I can build cpp-utilities, qtutilities and syncthingtray on macOS.

Tested environment: macOS 10.14.5, Xcode 11 beta 3 Test results: syncthingtray can be launched from the terminal and connect to the local syncthing server.

Martchus commented 5 years ago

Thanks, I always used the regular clang as cross compiler so I didn't run into the problem.

Nice that you were able to build and run Syncthingtray. If there were any special CMake arguments required or other tricks required please contribute those to the README.

You could also share a screenshot - I'm curious how it looks like with the Mac style. Maybe either enabling or disabling gives a better result.

Did CMake create the "bundle" correctly? If not I assume that would be the next thing to fix.

yan12125 commented 5 years ago

If there were any special CMake arguments required or other tricks required please contribute those to the README.

The only macOS-specific CMake argument I use to build this library is -DUSE_STANDARD_FILESYSTEM=OFF. <filesystem> is not supported by Xcode until upcoming macOS 10.15 [1], and I haven't upgraded my system. Based on the commit message of https://github.com/Martchus/cpp-utilities/commit/1be20da35a56900c012866ab874dee0cba2530b2, I guess it should also be documented for Android, too?

For other comments, I created an issue at https://github.com/Martchus/syncthingtray/issues/37.

Martchus commented 5 years ago

Based on the commit message of 1be20da, I guess it should also be documented for Android, too?

Yes, completely correct. The hint about the Bash completion is of course also true for the macOS build. So syncthingctl won't be able to suggest file names for rescan (Syncthing directory names should work, though).

Martchus commented 5 years ago

Added documentation for USE_STANDARD_FILESYSTEM.

yan12125 commented 5 years ago

syncthingctl won't be able to suggest file names for rescan (Syncthing directory names should work, though).

Sounds not a big issue :)

Added documentation for USE_STANDARD_FILESYSTEM.

Thanks!