CMake not finding Accelerate framework


In a project of mine, some of my dependencies apparently use the Accelerate framework. When linking against them, I get link lines that look like (I’m not sure why the -framework Accelerate is duplicated, but deduplicating it manually didn’t seem to make a difference):

/Users/sam/code/project/dep/install/bin/clang++ -g -arch arm64 -isysroot 
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wl,-search_paths_first 
-Wl,-headerpad_max_install_names -Wl,-no_compact_unwind 
tests/CMakeFiles/my_test.dir/my_test.cpp.o -o tests/my_test 
-Xlinker -framework -Xlinker Accelerate  -lm  -ldl  
-Xlinker -framework -Xlinker Accelerate  -lm  -ldl

which ends up failing with

ld: framework not found Accelerate

The accelerate framework is in the standard place:
and if I manually point the compiler at that directory with

target_link_options(mylib PUBLIC 

then things work correct correctly.

I’m trying to find out why this isn’t being done automatically, or how to work around it without hardcoding a machine-specific path in my CMakeLists.txt.

I see that there is a variable named CMAKE_SYSTEM_FRAMEWORK_PATH, and it has
the value of:


#output (verbatim)

Is this the expected output, with no whitespace or semicolon separators? If so, how can I extract the relevant framework directory from this variable?

Thank you

That output seems to indicate your CMAKE_SYSTEM_FRAMEWORK_PATH is not pointing at the standard system location, but rather your personal area under your home directory. That may be the source of your problem. I suggest tracking down what is setting CMAKE_SYSTEM_FRAMEWORK_PATH and if it is not coming from CMake itself, try to prevent that from happening.

If I just have a trivial CMake project I still get this incredibly long framework path:

% cat CMakeLists.txt 
cmake_minimum_required(VERSION 3.16)
project(simple LANGUAGES CXX)


% cmake . -Bbuild

Is this normal? This path doesn’t exist (or is this supposed to be multiple paths and the separators between list entries aren’t showing?), I would have expected something like a single entry of

I don’t know how to find out where this value comes from or how to fix it. The relevant documentation doesn’t offer any guidance:


  • cleanly reinstalling CMake from brew to 3.26.4 doesn’t change anything
  • binaries downloaded from give the same output