[CMake] Dependency question

David Cole david.cole at kitware.com
Fri Oct 28 13:25:29 EDT 2011


On Fri, Oct 28, 2011 at 1:06 PM, Robert Dailey <rcdailey at gmail.com> wrote:
> I'm using CMake 2.8.6 and generating for VS 2003.
> I have a DLL project that my EXE project needs to depend on, however I don't
> want my EXE to link against that DLL's import library, since the EXE will
> call LoadLibrary() to dynamically import symbols from the DLL being built.
> I want the EXE project to depend on the DLL project so that in visual studio
> the DLL is built when I build the EXE (because of project dependencies), but
> I don't want the DLL 's import LIB to be linked in via command line.
> Any way to do this?
>
> ---------
> Robert Dailey
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>

add_dependencies(exe dll)

But use the CMake target names, not "exe" and "dll"...

That makes sure that the project build for "dll" is completely done
before beginning any build commands for the "exe" project.


HTH,
David


More information about the CMake mailing list