Re: [CMake] Static Modules

2010-03-12 Thread Markus Raab
Hello! Alexander Neundorf wrote: I would not recommend creating the static libs, taking them apart again and then putting other libs together again. That will be kind of hacky. Just listing all the source files doesn't make problems and is straightforward. You are right, thank you very

Re: [CMake] Static Modules

2010-03-12 Thread Markus Raab
Hello! Michael Wild wrote: IMHO it would be simpler and safer to have a function which collects all the file names, adds them to a global property and then allows you to compile a static library from that. E.g (completely untested): Yeah, you are right, this approach sounds much better. But

Re: [CMake] Static Modules

2010-03-12 Thread Michael Wild
On 12. Mar, 2010, at 11:42 , Markus Raab wrote: Hello! Michael Wild wrote: IMHO it would be simpler and safer to have a function which collects all the file names, adds them to a global property and then allows you to compile a static library from that. E.g (completely untested): Yeah,

Re: [CMake] Static Modules

2010-03-11 Thread Michael Wild
On 11. Mar, 2010, at 8:56 , Markus Raab wrote: Hi! Ryan Pavlik wrote: get_target_properties() with the property SOURCES then for each value you get back there, do a get_source_file_properties() for LOCATION and add all such locations to a new list, then create a target with that source

Re: [CMake] Static Modules

2010-03-11 Thread Alexander Neundorf
On Thursday 11 March 2010, Markus Raab wrote: Alexander Neundorf wrote: We don't have that anymore, we just compile all the files directly into one library. But only in the dynamic way? Hmm, we don't really have a lot of static libs in KDE... We didn't have any issues with this since

Re: [CMake] Static Modules

2010-03-10 Thread Alexander Neundorf
On Tuesday 09 March 2010, Markus Raab wrote: Hi list! I am currently trying to migrate a autotools project to cmake. The project used modules intensively. It was possible to compile all these modules also statically and link them together to a single static library. Is this supported out of

Re: [CMake] Static Modules

2010-03-10 Thread Ryan Pavlik
On Wed, Mar 10, 2010 at 1:47 PM, Alexander Neundorf a.neundorf-w...@gmx.net wrote: On Tuesday 09 March 2010, Markus Raab wrote: Hi list! I am currently trying to migrate a autotools project to cmake. The project used modules intensively. It was possible to compile all these modules

Re: [CMake] Static Modules

2010-03-10 Thread Markus Raab
Alexander Neundorf wrote: We don't have that anymore, we just compile all the files directly into one library. But only in the dynamic way? We didn't have any issues with this since then. (it may be possible to hack something together with custom commands to extract the object files from

Re: [CMake] Static Modules

2010-03-10 Thread Markus Raab
Hi, Thank you both for your help! Ryan Pavlik wrote: A bit less work: if you're building all the modules in CMake too, you could loop through them extracting their source lists then adding those to a new target: probably could be generalizable to a custom command in a cmake module. Yes, all

Re: [CMake] Static Modules

2010-03-10 Thread Ryan Pavlik
get_target_properties() with the property SOURCES then for each value you get back there, do a get_source_file_properties() for LOCATION and add all such locations to a new list, then create a target with that source list. On Wed, Mar 10, 2010 at 5:04 PM, Markus Raab use...@markus-raab.org wrote:

Re: [CMake] Static Modules

2010-03-10 Thread Markus Raab
Hi! Ryan Pavlik wrote: get_target_properties() with the property SOURCES then for each value you get back there, do a get_source_file_properties() for LOCATION and add all such locations to a new list, then create a target with that source list. Thank you for your answer. The method you

[CMake] Static Modules

2010-03-09 Thread Markus Raab
Hi list! I am currently trying to migrate a autotools project to cmake. The project used modules intensively. It was possible to compile all these modules also statically and link them together to a single static library. Is this supported out of the box by cmake? How? This was realized by