title: How to pre process Pro*C files in cmake?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/14490096/how-to-compile-additional-source-files-in-cmake-after-the-build-process">How to compile additional source files in cmake after the build process</a>  </p>
  </blockquote>
  
  
  
  <p>I need to preprocess a proc file (Pro*C oracle) to generate a C file and then compile it along the rest of C files, I've tried to solve it without success like this</p>
  
  <pre><code>add_custom_command(TARGET my_proj OUTPUT PRE_LINK
      COMMAND ${PCC} iname=${PROJECT_SOURCE_DIR}/${conn}.proc 
          SQLCHECK=SYNTAX MODE=ANSI IRECLEN=255 ORECLEN=255
          ONAME=${PROJECT_SOURCE_DIR}/${conn}.c
      COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_FLAGS} ${PROJECT_SOURCE_DIR}/${conn}.c
  )
  </code></pre>
  
  <p>What am I doing wrong?</p>