title: How to configure CMakeLists.txt to install public headers of a shared library?
body: <p>I want to use cmake to install my library <code>edv</code> but when I execute:</p>
  
  <pre><code>cmake --build . --target install
  </code></pre>
  
  <p>It installs but it only creates the <code>bin/edv.dll</code> and <code>lib/ &lt; empty &gt;</code>. How can I make cmake to install the <code>EDV_PUBLIC_INCLUDE_DIRECTORIES</code> inside an <code>include/...</code> ?</p>
  
  <p>Here's my <code>CMakeLists.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.12)
  
  project(edv)
  
  # include PUBLIC directories
  set(EDV_PUBLIC_INCLUDE_DIRECTORIES      include/ )
  
  set(EDV_PRIVATE_INCLUDE_DIRECTORIES     src/   )
  
  # Edv source files list
  file(GLOB_RECURSE EDV_SOURCE_FILES "src/*.cpp" "src/*.hpp*")
  
  
  # build the library
  add_library(${PROJECT_NAME} SHARED ${EDV_SOURCE_FILES} )
  
  target_include_directories(${PROJECT_NAME} PUBLIC ${EDV_PUBLIC_INCLUDE_DIRECTORIES})
  target_include_directories(${PROJECT_NAME} PRIVATE ${EDV_PRIVATE_INCLUDE_DIRECTORIES})
  
  install (TARGETS ${PROJECT_NAME}
      RUNTIME DESTINATION bin
      LIBRARY DESTINATION lib
      ARCHIVE DESTINATION lib
      PUBLIC_HEADER DESTINATION include
  )
  </code></pre>