Using macports-libcxx to build a non-MacPorts cmake project

Wowfunhappy@gmail.com wowfunhappy at gmail.com
Mon May 3 17:10:30 UTC 2021


Hello!

I spent the weekend building a copy of the Dolphin emulator that is compatible with OS X 10.9! It mostly works, thanks in no small part to MacPorts's excellent legacy-support and clang-11 ports. https://forums.dolphin-emu.org/Thread-unofficial-dolphin-built-for-an-older-version-of-macos-os-x-10-9-mavericks

However, I had to remove a couple uses of shared_mutex from Dolphin's code, which I think may be leading to some odd freezes when configuring controllers. It occurred to me that I might be able to revert those changes (and hopefully fix the freezes) by building Dolphin against macports-libcxx.

Dolphin uses cmake, so I added the following to cmakelists.txt:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++")
include_directories(/opt/local/include/libcxx/v1)
link_directories(/opt/local/lib/libcxx)

But Dolphin can't seem to compile this way. I don't know a ton about how C and CMake work—am I doing this right?

(I'm also perfectly content to live with what I have—I'm delighted that I got Dolphin to work at all—but I wouldn't feel right unless I exhausted all possible avenues.)

Thank you!


More information about the macports-users mailing list