title: CMake to build shared object .so files in linux
body: <p>Task -> Run Cmake to generate dll in windows and shared object(.so files) in linux.   </p>
  
  <p>I am porting code from windows to linux . I have made the required changes in source code. I have tried changing the CMakeLists.txt files but when I tried to do make it complains of "Cannot find source files". May you guys please point me out where I am making mistake. CMakeList.txt is shown below.
  The cmake runs fine in windows but in linux it complains about the error.<br>
      I have commented few lines and added line in CMakeLIsts.txt to make it work in Linux but it doesn't work.</p>
  
  <pre><code>CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
  CMAKE_POLICY( SET CMP0017 NEW ) 
  
  PROJECT( disk_space_model )
  INCLUDE( ../libs/helper_functions.cmake )
  INCLUDE_THIRD_PARTY_SFC()
  
  SET(    HEADER_FILES 
          stdafx.h
          INS_sensor_model.h
  )
  
  SET(    SOURCE_FILES
          Disk_space_model.cpp
  )
  
  SET(    RESOURCE_FILES 
          "Disk Space DLL.rc"
          resource.h
  )
  
  COMMON_SETUP()
  SETUP_Lab_LIB_FILES( lib_foo lib_boo_files lib_platform lib_utils )
  
  #ADD_DEFINITIONS(-D_USRDLL -DINSSENSORDLL_EXPORTS)
  #ADD_LIBRARY( disk_space_model SHARED ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES} ${CMAKE_HELPER_FILES} )
  set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
  ADD_LIBRARY( disk_space_model [ STATIC | SHARED ] ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES}  ${CMAKE_HELPER_FILES} )
  SET_OUTPUT_DIRS( disk_space_model )
  TARGET_LINK_LIBRARIES( disk_space_model ${LIB_FILES} )
  </code></pre>
  
  <p>Below are the following errors that I have received when I do make after congiure and generate on CMake-gui</p>
  
  <pre><code>  4 bit compiler
  -- Configuring done
  CMake Error at CMakeLists.txt:37 (ADD_LIBRARY):
    Cannot find source file:
  
      [
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
  
  
  CMake Error in CMakeLists.txt:
    Cannot find source file:
  
      STATIC
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
  
  
  CMake Error in CMakeLists.txt:
    Cannot find source file:
  
      |
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
  
  
  CMake Error in CMakeLists.txt:
    Cannot find source file:
  
      SHARED
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
  
  
  CMake Error in CMakeLists.txt:
    Cannot find source file:
  
      ]
  
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx
  
  
  -- Build files have been written to: /home/mydir/svn/proj1/apps/disk space
  make: *** [cmake_check_build_system] Error 1
  </code></pre>