Re: [CMake] How to figure out the "type" of an imported library

2015-10-29 Thread Attila Krasznahorkay
Thanks! It indeed looks like it will do the job. Cheers, Attila > On 29 Oct 2015, at 20:42, Tamás Kenéz wrote: > > There's a TYPE property which should contain what you need: > https://cmake.org/cmake/help/latest/prop_tgt/TYPE.html > > On Thu, Oct 29, 2015 at 4:53 PM, Attila Krasznah

Re: [CMake] How to figure out the "type" of an imported library

2015-10-29 Thread Tamás Kenéz
There's a TYPE property which should contain what you need: https://cmake.org/cmake/help/latest/prop_tgt/TYPE.html On Thu, Oct 29, 2015 at 4:53 PM, Attila Krasznahorkay < attila.krasznahor...@gmail.com> wrote: > Dear All, > > In my code I'm trying to do something slightly tricky. I include packag

[CMake] Undef GENERATE_EXPORT_HEADER macros?

2015-10-29 Thread Matt Cotter
Hello! Is there a way to have cmake generate #undef's for all of the macros it creates in the GENERATE_EXPORT_HEADER command? I am trying not to leak these macros to users including the library, but I can't seem to find any way to generate this. As a reference, for other macros that I am defining

[CMake] How to figure out the "type" of an imported library

2015-10-29 Thread Attila Krasznahorkay
Dear All, In my code I'm trying to do something slightly tricky. I include packages that provide imported libraries (amongst other things). Then, because of how my project is structured, I don't make use of the imported libraries directly, but first make "copies" of them, and then make use of t

Re: [CMake] CMP0058 warning on configure-time generated source files

2015-10-29 Thread Brad King
On 10/29/2015 10:33 AM, Sylvain Joubert wrote: > I recently upgraded to CMake >= 3.3 and I get a CMP0058 warning on some > of the generated files. What I don't understand is that: > - These files are not generated at build time but at configure time, > why can't they just be seen as regular sourc

[CMake] connect libraries to project with cmakelists

2015-10-29 Thread Michaila Goula-Dimitriou
I am using the cmakelists.txt below, that exists in the top folder of my project, and I am trying to connect mpg123 and ao to my project. In one .cpp file of the source folder I added a code with mpg123 and ao to play a song. This code can be compiled with this line: *g++ mpg.cpp -lmpg123 -lao -o

[CMake] CMP0058 warning on configure-time generated source files

2015-10-29 Thread Sylvain Joubert
Hi, In my project I have some source files that are generated at configure time. Much like configure_file but using one execute_process call with an external executable, then a second execute_process with cmake -E copy_if_different to avoid unnecessary rebuild. The generated files (from the build

[CMake] Visual Studio Cross Compile

2015-10-29 Thread Michael Jaentsch
Hi all, I have a question concerning Cross Compiling with CMake on Windows. I would like to use Visual Studio but this is not a must. What I do is, I setup a project for Cross Compiling on Linux and it works fine. Now I want to transfer to Windows, so I set up a toolchain file which sets the

[CMake] Extract list of libraries with full path from link command line

2015-10-29 Thread Michele Dolfi
Hi, Here is my problem. Having a string like "-L/mydir/lib -lfoo -lbar", is there a 'nice' automated way to turn it into a proper list of libraries like "/mydir/lib/libfoo.dylib;/mydir/lib/libbar.dylib"? Or, is there a way for cmake to make this magic happen when I pass the above string to target

Re: [CMake] Asking CMake to setup compiler for c++11

2015-10-29 Thread Tamás Kenéz
this is what I do: if(NOT MSVC) if(CMAKE_VERSION VERSION_LESS 3.1) set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") else() if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD STREQUAL "98") set(CMAKE_CXX_STANDARD 11) endif() set(CMAKE_CXX

Re: [CMake] Asking CMake to setup compiler for c++11

2015-10-29 Thread Mueller-Roemer, Johannes Sebastian
This fails for me when using Visual Studio -- Johannes S. Mueller-Roemer, MSc Wiss. Mitarbeiter - Interactive Engineering Technologies (IET) Fraunhofer-Institut für Graphische Datenverarbeitung IGD Fraunhoferstr. 5 | 64283 Darmstadt | Germany Tel +49 6151 155-606 | Fax +49 6151 155-139 joha