title: Compile iOS dynamic library(.framework) with cmake
body: <p>I've compiled a c++ dynamic library using cmake and I want to add to my iOS app. But the header file directory of this .framework is empty, I refer to the CMakeFiles written in the cmake documentation. I don't know where the problem is?</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p><strong>Here is my CMake script</strong></p>
  
  <pre><code>cmake_minimum_required(VERSION 3.2)
  
  project(Xml C CXX)
  
  set(CMAKE_SYSTEM_NAME Darwin)
  
  set(CMAKE_SYSTEM_PROCESSOR arm)
  
  set(HEADERS
      ./include
  )
  
  include_directories(
      ${HEADERS}
  )
  
  aux_source_directory(. DIR_SRCS)
  
  add_library(Xml SHARED
      ${DIR_SRCS}
      ${HEADERS}
  )
  
  set_target_properties(Xml PROPERTIES
      FRAMEWORK TRUE
      FRAMEWORK_VERSION CXX
      PUBLIC_HEADER ${HEADERS}
      XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
  )
  </code></pre>
  
  <p><strong>Compilation progress</strong></p>
  
  <pre><code>Scanning dependencies of target Xml
  [ 10%] Building CXX object CMakeFiles/Xml.dir/ILock.cpp.o
  [ 20%] Building CXX object CMakeFiles/Xml.dir/ParamSet.cpp.o
  [ 30%] Building CXX object CMakeFiles/Xml.dir/StringConvert.cpp.o
  [ 40%] Building CXX object CMakeFiles/Xml.dir/XmlFile.cpp.o
  [ 50%] Building CXX object CMakeFiles/Xml.dir/XmlInterface.cpp.o
  [ 60%] Building CXX object CMakeFiles/Xml.dir/tinystr.cpp.o
  [ 70%] Building CXX object CMakeFiles/Xml.dir/tinyxml.cpp.o
  [ 80%] Building CXX object CMakeFiles/Xml.dir/tinyxmlerror.cpp.o
  [ 90%] Building CXX object CMakeFiles/Xml.dir/tinyxmlparser.cpp.o
  [100%] Linking CXX shared library Xml.framework/Xml
  Copying OS X content Xml.framework/Versions/CXX/Headers/include
  [100%] Built target Xml
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/q0cTq.jpg" rel="nofollow noreferrer">Compiled dynamic library</a></p>