title: CMake error - Cannot detect libjpeg and ADD_SUBDIRECTORY() error
body: <p>I am building Podofo in Windows using CMake and Visual Studio and have these 2 problems.</p>
  
  <p>One is CMake cannot detect libjpeg. </p>
  
  <blockquote>
    <p>CMake Warning at CMakeLists.txt:312 (FIND_PACKAGE):   By not providing
    "FindLIBJPEG.cmake" in CMAKE_MODULE_PATH this project has   asked
    CMake to find a package configuration file provided by "LIBJPEG", but 
    CMake did not find one.</p>
    
    <p>Could not find a package configuration file provided by "LIBJPEG"
    with any   of the following names:</p>
  
  <pre><code>LIBJPEGConfig.cmake
  libjpeg-config.cmake
  </code></pre>
    
    <p>Add the installation prefix of "LIBJPEG" to CMAKE_PREFIX_PATH or set
    "LIBJPEG_DIR" to a directory containing one of the above files.  If<br>
    "LIBJPEG" provides a separate development package or SDK, be sure it
    has   been installed.</p>
    
    <p>Libjpeg not found. JPEG support will be disabled</p>
  </blockquote>
  
  <p>While I already set commands in build.cmd file as below:</p>
  
  <pre><code>    set LIBJPEG_DIR=D:\jpeg-9
      cmake -G "Visual Studio 10" ..\podofo-src -DCMAKE_INCLUDE_PATH="%LIBJPEG_DIR%" -DCMAKE_LIBRARY_PATH="%LIBJPEG_DIR%" -DPODOFO_BUILD_SHARED:BOOL=FALSE -DFREETYPE_LIBRARY_NAMES_DEBUG=freetype245_D -DFREETYPE_LIBRARY_NAMES_RELEASE=freetype245MT
  </code></pre>
  
  <p>All the LIBJPEG files are all in d:\jpeg-9, header files and lib files. Why Cmake still cannot detect LIBJPEG?</p>
  
  <p>Another problem is I got error as below while running CMake.</p>
  
  <blockquote>
    <p>CMake Error at CMakeLists.txt:502 (ADD_SUBDIRECTORY):<br>
    add_subdirectory given source "src" which is not an existing
    directory.</p>
  </blockquote>
  
  <p>so I searched CMakeLists.txt and found below command:</p>
  
  <pre><code>ADD_SUBDIRECTORY(src)
  </code></pre>
  
  <p>What cause this error? How to avoid the error?</p>
  
  <p>Thanks.</p>