[CMake] Out-of-source build
Andreas Pakulat
apaku at gmx.de
Sun Nov 11 11:36:17 EST 2007
On 11.11.07 17:25:38, Yinon Ehrlich wrote:
> Hi,
>
> * I'm new to CMake, trying to convert our existing GNU Makefiles to CMake.
> * I need the out-of-source feature, and I want to make sure I do it the
> right way:
> SET(TOPLEVEL "../../..")
> SET(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/${TOPLEVEL}/bin)
> ... is this the "right" way to do this ?
That doesn't really work, because it makes assumptions as to where the
builddir is, relative to the source dir.
If you want your binaries all put into <builddir>/bin you should use the
EXECUTABLE_OUTPUT_PATH and set it to ${CMAKE_BINARY_DIR}/bin. The same
can be done for LIBRARY_OUTPUT_PATH to have libs in <builddir>/lib.
Andreas
--
Afternoon very favorable for romance. Try a single person for a change.
More information about the CMake
mailing list