On Saturday 23 June 2012, Stefan Reuschl wrote: > Am 22.06.2012, 20:21 Uhr, schrieb Kent Williams > > <nkwmailingli...@gmail.com>: > > OK, I guess. > > > > The only reason I bring this up is ITK. If you're familiar with the > > ITK build process, it has a 'module' concept -- not a module in the > > CMake sense (where it is a library intended for runtime loading), but > > in the sense that the build process is modular. Each of the ITK > > libraries is a module, which is defined by a standardised directory > > layout and cmake files. > > > > I made an Module for DCMTK that satisfies the requirements of an ITK > > module -- it builds DCMTK as an External Project, and uses > > add_library(name <lib-type> IMPORTED) on each of the libraries DCMTK > > creates, and connects the imported library with the actual library > > file in the file system. > > > > This all works fine EXCEPT for this one conundrum, you can't have the > > imported libraries depend on the ExternalProject target, so if you > > want to make sure the ExternalProject gets built before the targets > > that try to link to them, you have to make the executable (or library) > > target depend on the ExternalProject target to serialize the build of > > the dependee before the depnder. > > The following once worked fine for me using CMake 2.8.8: > > ExternalProject_Add( ep ) > add_library( epLib IMPORTED ) > set_target_properties( epLib PROPERTIES IMPORTED_LOCATION ... ) > add_dependencies( epLib ep )
Yes, that's what I use too, and it works fine for me, at least if you know what you are doing. Alex
-- 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