title: Understanding "requests linking to directory" cmake warning
body: <p>I am compiling an enormous code (100,000+ lines) on an Ubuntu 16.04 machine.  In the process of doing so, during the cmake (v3.5.1) build process (before running make), I generate a raft of WARNINGS. </p>
  
  <p>E.g.</p>
  
  <pre><code>WARNING: Target "gadgetron_moco" requests linking to directory "/usr/lib".  Targets may link only to libraries.  CMake is dropping the item.
  </code></pre>
  
  <p>Obviously, I can't repost the code here, but within the source code I found a <code>moco/CMakeLists.txt</code>.  Here is a code fragment from that file:</p>
  
  <pre><code>if(CUDA_FOUND)
      add_library(gadgetron_moco SHARED
          cpuRegistrationAveragingGadget.h
          gadgetron_moco_export.h
          gpuRegistrationAveragingGadget.h
          gpuRegistrationScatteringGadget.h
          RegistrationAveragingGadget.h
          RegistrationScatteringGadget.h
          ${CPU_GADGETS}
          ${GPU_GADGETS}
        )
  
      set_target_properties(gadgetron_moco PROPERTIES VERSION ${GADGETRON_VERSION_STRING} SOVERSION ${GADGETRON_SOVERSION})
  
      target_link_libraries(gadgetron_moco
        gadgetron_gadgetbase
        gadgetron_toolbox_cpucore gadgetron_mricore ${CPU_LIBS} ${GPU_LIBS}
        ${Boost_LIBRARIES} ${ISMRMRD_LIBRARIES}
        optimized ${ACE_LIBRARIES} debug ${ACE_DEBUG_LIBRARY}
        )
  
      install (TARGETS gadgetron_moco DESTINATION lib COMPONENT main)
  endif()
  </code></pre>
  
  <p>The command that I used to call cmake:</p>
  
  <pre><code>cmake -DCMAKE_INSTALL_PREFIX=/opt/gadgetron/ \
      -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 \
      -DCMAKE_C_COMPILER=/usr/bin/gcc-5 \
      -DBoost_INCLUDE_DIR=/usr/include/ \
      -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0/ \
      -DARMADILLO_LIBRARY=/usr/lib/ \
      -DARMADILLO_INCLUDE_DIR=/usr/include/ \
      -DMKLROOT_PATH=/opt/intel/ \
      -DZFP_INCLUDE_DIR=/opt/ZFP/inc \
      -DZFP_LIBRARY=/opt/ZFP/lib \
      -DCMAKE_PREFIX_PATH=/opt/ismrmrd/:/opt/siemens_to_ismrmrd:/usr/lib/ \
      -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ..
  </code></pre>
  
  <p>Question:
  What is the warning exactly telling me?  How do I go about debugging it?</p>