title: CMake with ios framework
body: <p>I developing an ios framework which using CMake. I write the below scripts in CMakeLists.txt so that I can use command <code>cmake</code> to produce <code>.xcodeproj</code> directory so that I can use it in xcode.</p>
  
  <pre><code>set(LIB_NAME mylib)
  set(LIB_TYPE STATIC)
  file(GLOB_RECURSE EXTRA_FILES platform/ios/*.mm platform/ios/*.m platform/ios/*.h)
  
  file(GLOB_RECURSE SOURCE_FILES
          "src/*.cpp"
          "src/*.c"
          "src/*.h"
          "src/*.hpp")
  
  source_group(${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCE_FILES})
  
  add_library(${LIB_NAME} ${LIB_TYPE} ${SOURCE_FILES} ${EXTRA_FILES})
  target_link_libraries(${LIB_NAME} ${LIBEVENT} ${LIBxxx} ${EXTRA_LIBS})
  
  file(GLOB_RECURSE IOS_PUBLIC_HEADERS "${PROJECT_SOURCE_DIR}/platform/ios/*.h")
  set_target_properties(${LIB_NAME} PROPERTIES
              FRAMEWORK TRUE
              MACOSX_FRAMEWORK_IDENTIFIER xxxx.xxxx
              MACOSX_FRAMEWORK_INFO_PLIST 
              ${PROJECT_SOURCE_DIR}/platform/ios/Info.plist
              PUBLIC_HEADER "${IOS_PUBLIC_HEADERS}"
              XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
              )
  </code></pre>
  
  <p>and after I type this command in cli, I can generate an IOS framwork in Products directory.</p>
  
  <p><code>cmake ../.. -GXcode -DCMAKE_TOOLCHAIN_FILE=../../ios.toolchain.cmake</code></p>
  
  <p>The variable <code>IOS_PUBLIC_HEADERS</code> contains some header files that I want someone to use who use my framework. The problem is when I use the framework in my demo, the compile says:</p>
  
  <p><code>"view/Baseview.h" file not found.</code> </p>
  
  <p>Some header file in <code>IOS_PUBLIC_HEADERS</code> variable use directive <code>import &lt;view/Baseview.h&gt;</code> to use my internal header file which I don't want my client user to include.</p>
  
  <p>anyone can help? </p>
  
  <p>thank you anyway, forgive my poor english.</p>