title: libpoly2tri.a does not link to the exe using target_link_libraries
body: <p>The main.cpp file in the project CmakeCheckPrj is: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "p3d_header.h"
  #include "NameLibrary.h"
  #include "poly2tri.h"
  
  int main(void)
  {
  const auto name = p3d::NameLibrary::MATERIAL_ASSIGMENT_ATTR(); 
  std::cout&lt;&lt;"The name library  returned :"&lt;&lt;name &lt;&lt; std::endl;
  std::vector&lt;p2t::Point*&gt; list;
  p3d::Vector3 ver1(1.0,2.0);
  p3d::Vector3 ver2(1.0,1.0);
  p3d::Vector3 ver3(3.0,1.0);
  p2t::Point* newPt = new p2t::Point(ver1.x,ver1.y);
  p2t::Point* newPt1 = new p2t::Point(ver2.x,ver2.y);
  p2t::Point* newPt2 = new p2t::Point(ver3.x,ver3.y);
  list.push_back(newPt);
  list.push_back(newPt1);
  list.push_back(newPt2);
  
  p2t::CDT patch1(list);
  patch1.Triangulate();
  std::vector&lt;p2t::Triangle*&gt; triList = patch1.GetTriangles();
  return 0;
  </code></pre>
  
  <p>} </p>
  
  <p>The CmakeCheckPrj project CmakeLists.txt is: </p>
  
  <pre><code>set(PROJ_NAME "CmakeCheckPrj")
  project(${PROJ_NAME} CXX)
  
  set(CUDA_FREE_CONFIG "TRUE" CACHE STRING "" FORCE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -DCUDA_FREE")    
  
  if("${LIB_PATH}" STREQUAL "")
      message("For now pelase set LIB_PATH as the path to p3d_projects folder")
  else("${LIB_PATH}" NOT STREQUAL "")
      set(STATIC_LIB_PATH ${LIB_PATH}/p3d_build/linux/P3DInfrastructure/libP3DInfrastructure.a )
      message("The internal static library path is ${STATIC_LIB_PATH}")
  endif()
  
  FILE(GLOB SRCFILES "*.cpp")
  FILE(GLOB HDRFILES "*.h")   
  
  add_subdirectory(../P3DInfrastructure ../P3DInfrastructure)
  Set(INC_DIR ../inc/linux_inc/poly2tri;../P3DInfrastructure;../abutil;) 
  
  include_directories(${INC_DIR})
  add_executable (CmakeCheckPrj ${SRCFILES} ${HDRFILES})
  add_dependencies (CmakeCheckPrj P3DInfrastructure )
  
  set(EXT_LIB_PATH ${LIB_PATH}/lib/linux_lib/debug/)
  message("External Library Path is ${EXT_LIB_PATH}")
  
  find_library(RESULT NAMES libpoly2tri.a PATHS ${EXT_LIB_PATH})
  message("External Library Path found ${RESULT}")
  
  target_link_libraries(CmakeCheckPrj ${RESULT})
  </code></pre>
  
  <p>The cmake on generate correctly finds the library:</p>
  
  <pre><code>External Library Path is /igd/3dt/home/sbidarah/3DT_NEW_TAGGED/p3d_projects/lib/linux_lib/debug/
  External Library Path found /igd/3dt/home/sbidarah/3DT_NEW_TAGGED/p3d_projects/lib/linux_lib/debug/libpoly2tri.a
  </code></pre>
  
  <p>When building the CmakeCheckPrj, the following error is seen:</p>
  
  <pre><code>main.cpp:(.text+0x1f1): undefined reference to       `p2t::CDT::CDT(std::vector&lt;p2t::Point*, std::allocator&lt;p2t::Point*&gt; &gt;)'
  main.cpp:(.text+0x20c): undefined reference to `p2t::CDT::Triangulate()'
  main.cpp:(.text+0x222): undefined reference to `p2t::CDT::GetTriangles()'
  main.cpp:(.text+0x242): undefined reference to `p2t::CDT::~CDT()'
  main.cpp:(.text+0x287): undefined reference to `p2t::CDT::~CDT()'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>The link to the poly2tri fails and hence the error of undefined references to the methods of the CDT class. Please help me to know what am I doing wrong and what is the correct way to link the library to the exe? </p>
  
  <p>Thanks &amp; Regards,</p>