[CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

Heine, Christian (EXTERN: VWGEDS) extern.christian.heine at volkswagen.de
Thu May 12 06:40:54 EDT 2011

Thanks Eike for this hint! This works, but I couldn't use it. 

One reason is, that any module is loosely coupled. It doesn't know where the other modules it's depends on are located. By this reason I need a place where any final library is archived and could be linked by the executable at runtime like the /usr/local/lib folder on Linux, so I think the system32 folder is the right place on windows platforms ...

The second reason is, that I've to perform an installation before I could start the demo files. But normally I would start them before I install the module, i.e. to test implementation details. By this reason the demo executable must be able to link the actual library after a simple build...

>Mit freundlichen Grüßen
Christian Heine

T-Systems on site services GmbH
Procurement Systems

>Telefon/phone: +49-5361-9-78564
>E-Mail: extern.christian.heine at volkswagen.de

Christian Heine
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: christian.heine at t-systems.com
Internet: http://www.t-systems-onsite.de 

Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485


Notice: This transmittal and/or attachments may be privileged or confidential. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, or copying is strictly prohibited. If you received this transmittal in error, please notify us immediately by reply and immediately delete this message and all its attachments. Thank you.

-----Ursprüngliche Nachricht-----
Von: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] Im Auftrag von Rolf Eike Beer
Gesendet: Donnerstag, 12. Mai 2011 11:33
An: cmake at cmake.org
Betreff: Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

> Hi,
> I'm not sure that I'm on the right path, therfore I will explain what I
> will do. I'm migrating our Linux project to Windows plattforms. Our
> project is build on several modules, which have to create and installed as
> libraries with cmake, some modules have dependencies to other modules. So
> far so good. This works fine on linux and windows.
> Now I've implemented several demos for one of those modules. On Linux
> there is no problem, if I've installed the dependencies correctly I could
> build my demo executables and run them directly. But on windows platfforms
> I'm struggling. To run the executables it's required to place the required
> libraries besides the executable or in system32 folder ...
> If I install the module dependencies with a cutstom install target to
> system32 folder I could ensure that those libraries could be linked by the
> executable at runtime. So I've got a behaviour like on Linux plattform for
> the module dependencies. But what is the best way to handling the library
> of the actual build? This file is placed to a lib subfolder which is
> differend from the demo executalbes (bin subfolder).

You can install the different "parts" of a library to different folders
(see the documentation of which parts means what). So this may solve your
issue by installing the DLLs to the same place as the executables:


Also installing into system32 on Windows usually causes great mess. If the
above doesn't work just try adding your lib directory to the system PATH
before starting your executable.

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:

More information about the CMake mailing list