From: "Ladanyi, Akos" <[email protected]>
Subject: [CMake] running executables linked to a dll in the build
directory
My source tree consists of a library, and some test programs for the
library. The library is built as a dll, and the test programs link
against the import library of this dll. When I try to run the test
programs (in the build tree), they fail, because they can not find the
dll. What is the proper way of solving this with CMake?
The only solution I found in the archives is setting
RUNTIME_OUTPUT_DIRECTORY so that the dll and the executables end up in
the same folder. Is there a better way?
YIKES! Some of those other answers were very complicated. Your suggestion
is the best approach -- Windows automatically looks in the current folder
for dlls (unlike Unix which has no default), so this is by far the easiest way.
See also the CMAKE_RUNTIME_OUTPUT_DIRECTORY (I think that is what it is
called) that you can set once, which then sets the RUNTIME_...
automatically for your targets.
--
Brad Aisa
Department of Psychology
University of Colorado - Boulder
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake