title: Adding wxWidgets to a project using cmake in Windows
body: <p>I am trying to add wxWidgets to my project using cmake.</p>
  
  <p>in cmake I have:</p>
  
  <pre><code>#wxWidgets
  set(wxWidgets_CONFIGURATION mswu)
  find_package(wxWidgets COMPONENTS core base REQUIRED)
  include(${wxWidgets_USE_FILE})
  </code></pre>
  
  <p>and for my project in cmake I have:</p>
  
  <pre><code>target_link_libraries(MyProject
      ${OpenCV_LIBS}
      ${wxWidgets_LIBRARIES}
      ${Boost_LIBRARIES})
  </code></pre>
  
  <p>and then  run cmake using:</p>
  
  <pre><code> cmake -G  "Visual Studio 11 Win64" ..
  </code></pre>
  
  <p>but when I compile the generated project in visual studio I am getting link error:</p>
  
  <pre><code> unresolved external symbol "public: __cdecl wxSplashScreen::wxSplashScreen(class wxBitmap const &amp;,long,int,class wxWindow *,int,class wxPoint const &amp;,class wxSize const &amp;,long)" (??0wxSplashScreen@@QEAA@AEBVwxBitmap@@JHPEAVwxWindow@@HAEBVwxPoint@@AEBVwxSize@@J@Z) referenced in function "public: __cdecl MainWindow::MainWindow(void)" (??0MainWindow@@QEAA@XZ) 
  
   unresolved external symbol "public: virtual __cdecl wxSplashScreen::~wxSplashScreen(void)" (??1wxSplashScreen@@UEAA@XZ) referenced in function "public: __cdecl MainWindow::MainWindow(void)" (??0MainWindow@@QEAA@XZ) 
  
   unresolved external symbol main referenced in function __tmainCRTStartup   
  </code></pre>
  
  <p>What is the problem and how can I fix it?</p>