[CMake] Specifying separate paths for .lib and .dll files on Windows

Prashanth Udupa prashanth.udupa at gmail.com
Mon May 31 07:37:14 EDT 2010


Sorry, I think I sent this question too soon...

The following constructs did the trick for me..

    SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
        ${PROJECT_SOURCE_DIR}/lib CACHE
        PATH "Directory where all the .lib files are dumped." FORCE)
    SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY
        ${PROJECT_SOURCE_DIR}/bin CACHE
        PATH "Directory where .exe and .dll files are dumped." FORCE)

Thanks,
Prashanth

On Mon, May 31, 2010 at 4:44 PM, Prashanth Udupa
<prashanth.udupa at gmail.com> wrote:
> Hi,
>
> I have a library project that I am generating the build system for
> using CMake. I would like to have the .lib file generated in one
> directory and the .dll file in another directory. Right now I am using
> a construct as follows
>
> SET(LIBRARY_OUTPUT_PATH
>    ${PROJECT_SOURCE_DIR}/bin CACHE
>    PATH "Single output directory for building all libraries." FORCE)
>
> While .dll files show up in PROJECT_SOURCE/bin, .lib files show up
> within PROJECT_SOURCE/bin/Debug or Release directory. How can I set
> the path of the .lib file to PROJECT_SOURCE/lib?
>
> Can someone please throw a few hints for me please?
>
> Thanks and Warm Regards,
> Prashanth N Udupa
>


More information about the CMake mailing list