title: Why I cannot link the Mac framework file with CMake?
body: <p>I have a question related to CMake in MAC. I make sure that the executable program will link the framework and libraries correctly with the following codes:</p>
  
  <pre><code>link_directories(directory_to_framework_and_libs)
  add_executable(program ${FILE_LIST})
  target_link_libraries(program framework_name lib1 lib2)
  </code></pre>
  
  <p>In the first line code, I denote the location where the executable program can search for the framework and libraries. In the third line code, the framework and the libraries will link to the executable program.  However, when I compile the xcode.project created from the cmake file with Xcode 4, the project keeps complaining that it cannot find <code>-lframework_name</code>: <code>ld: library not found -lframework_name</code> Any ideas will be appreciated. </p>