On 17.01.08 11:47:38, Matthias Schweinoch wrote: > I'm a new cmake user and I'm having a little trouble. Perhaps someone > here can help me: I was wondering if it is possible to specify a build > path manually within the toplevel CMakeLists.txt file? I did read the > wiki about out-of-source build environments, but the examples all used > ccmake for setting it up (or I missed it). The same applies to lib/bin > paths, i.e. I would like to specify an out-of-source lib directory and > an out-of-source bin directory to place the executables in... what > would be the appropriate command for this?
Usually you build the whole application "out-of-source", i.e. you create a empty directory somewhere and simply run: cmake <path-of-source-dir> in it. Then all your output files, .o, generated files, Makefile's and also libs/executables will be in the newly created directory. This so-called builddir has the same structure as your sourcedir (almost at least, every subdir that has a CMakeLists.txt exists also in the builddir) and the binaries/libs are in the subdir where you specified them. As Alexander already said, you can easily make sure all these are in the same subdir inside your buildtree, by using LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH. Andreas -- Caution: breathing may be hazardous to your health. _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake