[CMake] Question about add_library with IMPORTED

2010-03-09 Thread Benoit Thomas
Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding this library using the following code: set (IMPORTED_LOCATION ../farfaraway/lib) add_library (mylib STATIC IMPORTED) When I run cmake

Re: [CMake] Question about add_library with IMPORTED

2010-03-09 Thread Michael Wild
On 9. Mar, 2010, at 18:27 , Benoit Thomas wrote: Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding this library using the following code: set (IMPORTED_LOCATION

Re: [CMake] Question about add_library with IMPORTED

2010-03-09 Thread Ryan Pavlik
IMPORTED_LOCATION is a target property, not a variable - use set_target_properties after your add_library, see the docs for more info. Ryan On Tue, Mar 9, 2010 at 11:27 AM, Benoit Thomas benoit.tho...@gameloft.comwrote: Hello, I have a library which is a Visual Studio project only (which

Re: [CMake] Question about add_library with IMPORTED

2010-03-09 Thread Alexander Neundorf
On Tuesday 09 March 2010, Benoit Thomas wrote: Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding this library using the following code: set (IMPORTED_LOCATION ../farfaraway/lib)

Re: [CMake] Question about add_library with IMPORTED

2010-03-09 Thread Benoit Thomas
I knew I was missing something :) Thanks for the answers, work perfectly now ! Ben. On 2010-03-09 12:27, Benoit Thomas wrote: Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding this

[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

Re: [CMake] adding dependencies on generated files to source code files

2010-03-09 Thread Tony Bridges
Hi JD, Busy day, at a conference all day, and just got a chance to look into this. Unfortunately, no, the pretty much make sure part actually doesn't. With the add_dependency in place on the executable, to bind it to the external target, still, the external target is not generated before the

Re: [CMake] Change library search order

2010-03-09 Thread Anatoly Shirokov
Hi Ryan! Of cause, in my first post I meant link_directories. The link_directories does not have BEFORE and AFTER tags, so the Visual Studio library directory is preferred when I link to some system library because this is always the first directory. BR, Anatoly Shirokov. Ryan Pavlik