title: CMake Exported Lib - Cannot find include/lib paths in client app
body: <p>So I have two CMake projects, MyLib and MyApp. I build, install and export MyLib to a custom directory (right now just using my desktop:  /Users/MyName/Desktop/InstallDir) and then I want to use find_package() to find MyLin when building MyApp. </p>
  
  <p>So my CMakeLists.txt file for MyLib has the following code: </p>
  
  <pre><code>set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../install")
  
  target_include_directories(mylib PUBLIC 
                        $&lt;INSTALL_INTERFACE:include&gt; )
  
  install(TARGETS mylib
          EXPORT mylib-targets 
          PUBLIC_HEADER DESTINATION include 
          ARCHIVE DESTINATION lib
          LIBRARY DESTINATION lib
          RUNTIME DESTINATION bin)
  
  install(EXPORT mylib-targets 
          NAMESPACE mylib::
          FILE mylib-config.cmake
          DESTINATION lib/cmake/mylib)
  
  export(PACKAGE mylib)
  </code></pre>
  
  <p>This creates a mylib-config.cmake file in install/cmake/mylib </p>
  
  <p>Then in MyApp's CMakeLists.txt file I have the following code</p>
  
  <pre><code>set(mylib_DIR "${CMAKE_SOURCE_DIR}/../../install/lib/cmake/mylib")
  set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/../../install")
  
  find_package(mylib REQUIRED)
  message("Include dirs: "  ${mylib_INCLUDE_DIRS} )
  message("Libs: " ${mylib_LIBRARIES} )
  </code></pre>
  
  <p>However, when I build MyApp, mylib_INCLUDE_DIRS and mylib_LIBRARIES are both empty. If I check the mylib-config.cmake file, those variables are not defined in there either, but I thought that when exporting a package, those were automatically generated? </p>
  
  <p>What steps am I missing? </p>