<div id="mainbar">



<div class="" id="question">
    
    <table>
    <tbody><tr>
    <td class="">
        

<div class="">
    
    <br><span style title="View upvote and downvote totals" class=""></span>
       

 
</div>

    </td>
    
<td class="">
<div>          
    <div class="">
        <p>I am trying to figure out what I am doing wrong when trying to use just flex in a Cmake file to build a shared lib.</p>

<p>i basically have the following</p>

<pre style class=""><code><span class="">find_package</span><span class="">(</span><span class="">FLEX</span><span class="">)</span><span class="">
FLEX_TARGET</span><span class="">(</span><span class="">Test</span><span class=""> </span><span class="">../</span><span class="">src</span><span class="">/</span><span class="">test</span><span class="">.</span><span class="">l </span><span class="">../</span><span class="">src</span><span class="">/</span><span class="">test</span><span class="">.</span><span class="">c</span><span class="">)</span><span class="">
</span><span class="">set</span><span class="">(</span><span class="">SRC_FILES mysource</span><span class="">.</span><span class="">c $</span><span class="">{</span><span class="">FLEX_Test_OUTPUTS</span><span class="">})</span><span class="">
add_libary</span><span class="">(</span><span class="">testlib $</span><span class="">{</span><span class="">SRC_FILES</span><span class="">})</span><span class="">
target_link_libraries</span><span class="">(</span><span class="">testlib crypto c $</span><span class="">{</span><span class="">FLEX_LIBRARIES</span><span class="">})</span></code></pre>

<p>this is giving me a problem saying it cant find ../src/test.c</p>

<p>any ideas how I can make sure Lex ran first? secondly,how can i pass 
my -L and -d options to lex (like I am doing in my normal, pre-cmake 
version of this makefile)</p>

    </div></div></td></tr></tbody></table></div></div>