title: linking 3rd party libraries
body: <p>I have created a simple application that works ok. However, now I need to link with some libraries in the following directory.</p>
  
  <pre><code>/opt/norton/lib
  </code></pre>
  
  <p>In my make file I have the following with works, but I need to use cmake</p>
  
  <pre><code>LIBS_PATH = -L/opt/norton/lib
  INC_PATH = -I/opt/norton/inc
  
  LIBS = -lntctrl
  </code></pre>
  
  <p>In my CMakeList.txt I have this but doesn't work I keep gettng the following error:</p>
  
  <pre><code>undefined reference to `nt_init'
  </code></pre>
  
  <p>This is my CMakeList.txt</p>
  
  <pre><code># Includes files
  INCLUDE_DIRECTORIES(/opt/norton/inc)
  
  # Link libraries
  LINK_DIRECTORIES(/opt/norton/lib)
  
  # Add the library that is used by nt_init
  TARGET_LINK_LIBRARIES(-lntctrl)
  
  ADD_LIBRARY(application initialize_nw) 
  </code></pre>
  
  <p>Many thanks for any advice,</p>