[CMake] DLL not found question

Alexander Neundorf a.neundorf-work at gmx.net
Mon Sep 18 02:51:55 EDT 2006


Von: Wojciech Jarosz <wjarosz at ucsd.edu>

> Hi all,
> I'm just starting to use CMake with Windows (have used it for a while 
> now on Linux) so please forgive me if my question is stupid. I tried 
> looking in the archives but didn't find anything related.
> 
> I have a project set up on Windows now (it compiles and links 
> correctly), but what is the normal way to run the executables or tests? 
> I have tried doing it manually from a Visual Studio command line, or 
> >from within Visual Studio (right click->debug->start new instance), but 
> both of these techniques complain that it cannot find my DLLs. I figured 
> at least the method from within Visual Studio would be able to set the 
> environment correctly to find the DLLs. Is there some CMakeLists.txt  
> magic that will set this up correctly? Or is the solution really that I 
> have to add each DLL build dir to my path manually within Windows?
> 
> I have tried copying all necessary DLLs to my executable build dir by 
> hand and that works fine. Hopefully there is a more elegant solution.

You could set EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH to the same directory, then both should end up in the same directory.

Alex

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


More information about the CMake mailing list