title: CMake install: installing configuration files
body: <p>I want CMake to make install rules for me which also automatically install configuration and other things. I looked at <a href="https://stackoverflow.com/questions/10972577/c-cmake-add-non-built-files">this question</a>, but adding:</p>
  
  <pre><code>add_executable(solshare_stats.conf solshare_stats.conf)
  </code></pre>
  
  <p>to my CMakeLists.txt file only gave me warnings and errors:</p>
  
  <pre><code>CMake Error: CMake can not determine linker language for target:solshare_stats.conf
  CMake Error: Cannot determine link language for target "solshare_stats.conf".
  ...
  make[2]: *** No rule to make target `CMakeFiles/solshare_stats.conf.dir/build'.  Stop.
  make[1]: *** [CMakeFiles/solshare_stats.conf.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>How do I add configuration, init and/or logfiles to CMake install rules?</p>
  
  <p>Here is my complete CMakeLists.txt file:</p>
  
  <pre><code>project(solshare_stats)
  cmake_minimum_required(VERSION 2.8)
  aux_source_directory(. SRC_LIST)
  add_executable(${PROJECT_NAME} ${SRC_LIST} )
  add_executable(solshare_stats.conf solshare_stats.conf)
  target_link_libraries(solshare_stats mysqlcppconn)
  target_link_libraries(solshare_stats wiringPi)
  if(UNIX)
      if(CMAKE_COMPILER_IS_GNUCXX)
          SET(CMAKE_EXE_LINKER_FLAGS "-s")
          SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -std=c++0x")
      endif()
      install(TARGETS solshare_stats DESTINATION /usr/bin COMPONENT binaries)
      install(TARGETS solshare_stats.conf DESTINATION /etc/solshare_stats COMPONENT config)
  endif()
  </code></pre>