title: Setting up FLTK on windows with CMake
body: <p>I'm trying to setup FLTK to build on windows with CMake with the Windows SDK.<br>
  So far here's what I've accomplished so far:</p>
  
  <pre><code>&gt; svn co http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/ fltk-1.3
  &gt; cmake CMakeLists.txt -DOPTION_BUILD_EXAMPLES=NO -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\dev\fltk-1.3
  &gt; nmake
  &gt; nmake install
  </code></pre>
  
  <p>No errors so far.</p>
  
  <p>Then I created a test.cpp file with a hello world example I got off the documentation.<br>
  Here's my CMakeLists.txt:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.6)
  project(Test)
  
  find_package(FLTK REQUIRED NO_MODULE)
  include(${FLTK_USE_FILE})
  
  add_executable(test WIN32 test.cpp)
  
  target_link_libraries(test fltk)</code></pre>
  
  <p>When I run <code>cmake CMakeLists.txt</code> I get an error asking me to set <code>FLTK_DIR</code>, so here's what I've got so far:</p>
  
  <pre>
  > cmake CMakeLists.txt
  (error about FLTK_DIR)
  > cmake CMakeLists.txt -DFLTK_DIR=C:\dev\fltk-1.3\CMake
  > nmake
  </pre>
  
  <p>The last nmake command gives me this output:</p>
  
  <pre>
  [100%] Building CXX object CMakeFiles/test.dir/Test.cpp.obj
  Test.cpp
  Linking CXX executable test.exe
  LINK : fatal error LNK1104: cannot open file ';.obj'
  LINK Pass 1 failed. with 2
  NMAKE : fatal error U1077: 'C:\dev\cmake-2.8.7-win32-x86\bin\cmake.exe' : return code '0xffffffff'
  Stop.
  NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
  Stop.
  NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'
  Stop.
  </pre>
  
  <p>I tried letting FLTK install itself to the default location, which didn't make any difference.</p>
  
  <p>So, can anyone help me get this working?</p>