diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 75b7f9d1..61ed7b82 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -30,6 +30,12 @@ _add_example(cpp-multithread if(NOT WIN32) target_link_libraries(cpp-multithread pthread) endif() +if(APPLE) + # since we use a deployment target of 10.8, the non-C++11-compliant libstdc++ is chosen by default; we need C++11 + # see issue #302 for more details + target_compile_options(cpp-multithread PRIVATE --stdlib=libc++) + target_link_libraries(cpp-multithread --stdlib=libc++) +endif() _add_example(drawtext drawtext/main.c