[CMake] Setting environment variables for custom targets

2007-11-15 Thread Josef Karthauser
I'm using a custom target to run an external command to build some objects, however the external command needs some environment variables setting to run properly. Is there a way of setting an environment variable within CMAKE, so that it gets used during the build? It doesn't appear that,

Re: [CMake] No FileIsSymlink(...) for Win32?

2007-11-15 Thread Pau Garcia i Quiles
Quoting Gonzalo Garramuño <[EMAIL PROTECTED]>: Pau Garcia i Quiles wrote: Windows 2000 Server, XP and 2003 Server, at least, include a linkd.exe utility which creates actual symlinks. It only works on NTFS filesystems, AFAIK, but it works well. Active Directory relies uses linkd'd direc

Re: [CMake] CPack on Win32: "cannot find sutable ZIP program"

2007-11-15 Thread Stephen Collyer
David Cole wrote: > If you install the WinZip command line tools, CPack will find that and > additionally make a zip file of the "make install" tree in addition to > building the NSIS installer. Right. I suspected it was something like that. Maybe the error message could be a bit more verbose, th

Re: [CMake] CPack on Win32: "cannot find sutable ZIP program"

2007-11-15 Thread David Cole
On 11/15/07, Stephen Collyer <[EMAIL PROTECTED]> wrote: > > > The whole cmake workflow, up to cpack, is incredibly impressive, > and adding NSIS into it in a JustWorks(tm) fashion is too good > to be true. When do I wake up ? things that just work == good == happy developer == happy end users :

Re: [CMake] CPack on Win32: "cannot find sutable ZIP program"

2007-11-15 Thread David Cole
By default, on Windows, CPACK_GENERATOR is set to "NSIS;ZIP". You can do this...: SET(CPACK_GENERATOR "NSIS") ...prior to INCLUDE(CPack) ...if you are only interested in the NSIS installer. If you install the WinZip command line tools, CPack will find that and additionally make a zip file of the

Re: [CMake] CPack on Win32: "cannot find sutable ZIP program"

2007-11-15 Thread Miguel A. Figueroa-Villanueva
On 11/15/07, Stephen Collyer wrote: > The whole cmake workflow, up to cpack, is incredibly impressive, > and adding NSIS into it in a JustWorks(tm) fashion is too good > to be true. When do I wake up ? And have you checked out CTest, for unit testing, and the Dashboard? Never ceases to impress me

[CMake] CPack on Win32: "cannot find sutable ZIP program"

2007-11-15 Thread Stephen Collyer
I'm trying to build the generated PACKAGE project from Visual Studio after adding INCLUDE(CPack) line to my CMakeLists.txt file, and it fails at some point with the message: "cannot find suitable ZIP program" Can someone tell me what's generating this message (NSIS maybe ?), and which zip program

Re: [CMake] Invoking tarhets in Handwritten Makefile through CMake

2007-11-15 Thread Brandon Van Every
On Nov 15, 2007 2:49 AM, Amit C. Kr. Saluja <[EMAIL PROTECTED]> wrote: > Hi, > > How can I add to the all: target to invoke make in > handwritten Makefiles through CMake add_custom_target(targetname ALL ... Cheers, Brandon Van Every ___ CMake mailing l

[CMake] Win32: Link failure with ADD_LIBRARY SHARED

2007-11-15 Thread Stephen Collyer
I have a trivial project that builds a single executable and a library against which it links. The source tree looks like: src/exe/test_prog.cpp src/lib/Test.cpp, Test.h When I set up the cmake files to build a static library the test_prog exe builds and runs fine on both Linux and Win32. When I

Re: [CMake] Setting environment variables for custom targets

2007-11-15 Thread Brandon Van Every
On Nov 15, 2007 4:03 AM, Josef Karthauser <[EMAIL PROTECTED]> wrote: > I'm using a custom target to run an external command to build some > objects, however the external command needs some environment variables > setting to run properly. Is there a way of setting an environment > variable within C

Re: [CMake] Win32: Link failure with ADD_LIBRARY SHARED

2007-11-15 Thread Stephen Collyer
Stephen Collyer wrote: > When I add a SHARED specifier to the ADD_LIBRARY command for > the Test library, the exe builds and run fine on Linux, but > fails at link time when the projects are built under Visual > Studio, with a message: > > LINK : fatal error LNK1104: cannot open file 'Test.lib' >

Re: [CMake] Win32: Link failure with ADD_LIBRARY SHARED

2007-11-15 Thread David Cole
By default, nothing is exported from a DLL on Windows. You have to decorate the code with __declspec(dllexport) or provide a .def file to specify what gets exported. Once you've exported something from the library, building it again will produce a .lib file that you'll be able to link against. Po

Re: [CMake] No FileIsSymlink(...) for Win32?

2007-11-15 Thread Miguel A. Figueroa-Villanueva
On 11/14/07, Gonzalo Garramuño wrote: > Miguel A. Figueroa-Villanueva wrote: > You may, however, want to request a function to parse shortcuts, albeit > you can probably write it in .cmake yourself (as it a .lnk file is just > a text file). Yes, I understand that windows doesn't have real symbolic

RE: [CMake] Setting environment variables for custom targets

2007-11-15 Thread Josef Karthauser
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Brandon Van Every > Sent: 15 November 2007 14:17 > To: cmake@cmake.org > Subject: Re: [CMake] Setting environment variables for custom targets > > It doesn't appear that, > > > > SET(ENV{MYVAR}

[CMake] CMake and CORBA

2007-11-15 Thread Benjamin Behringer
Hello I would like to use the considerable advantages of CMake in our CORBA project. Can the configurations be done by CMake or if not is there a way to call mico-c++ compiler instead of g++ compiler? Many thanks in advance! Best regards Benjamin ___ C

Re: [CMake] CMake and CORBA

2007-11-15 Thread Brandon Van Every
On Nov 15, 2007 1:36 PM, Benjamin Behringer <[EMAIL PROTECTED]> wrote: > Hello > > I would like to use the considerable advantages of CMake in our CORBA > project. > Can the configurations be done by CMake or if not is there a way to call > mico-c++ compiler instead of g++ compiler? Sure... and it

Re: [CMake] CMake and CORBA

2007-11-15 Thread Benjamin Behringer
Alexander Neundorf wrote: > On Thursday 15 November 2007, Benjamin Behringer wrote: > >> Hello >> >> I would like to use the considerable advantages of CMake in our CORBA >> project. >> Can the configurations be done by CMake or if not is there a way to call >> mico-c++ compiler instead of g++ c

Re: [CMake] CMake and CORBA

2007-11-15 Thread Leopold Palomo-Avellaneda
A Dijous 15 Novembre 2007, Benjamin Behringer va escriure: > Alexander Neundorf wrote: > > On Thursday 15 November 2007, Benjamin Behringer wrote: > >> Hello > >> > >> I would like to use the considerable advantages of CMake in our CORBA > >> project. > >> Can the configurations be done by CMake or

Re: [CMake] No FileIsSymlink(...) for Win32?

2007-11-15 Thread Gonzalo Garramuño
Miguel A. Figueroa-Villanueva wrote: So, what I'm trying to asses is whether an implementation of the cmake: SystemTools::FileIsSymlink(), which now just returns false for windows, is feasible or not. Not likely. You'd probably be slowing the make significantly if you had to check and reso

[CMake] Applying command to source files

2007-11-15 Thread Eric Noulard
Hi All, I plan to use CMake to apply possibly automatic re-indentation programs like indent or astyle to every C/C++ source files in a project. Has anybody here done such thing using CMake? I did plan some CMake scripting using EXECUTE_PROCESS to launch the command but I currently lack a command

Re: [CMake] Setting environment variables for custom targets

2007-11-15 Thread Brandon Van Every
On Nov 15, 2007 1:53 PM, Josef Karthauser <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > Behalf > > Of Brandon Van Every > > Sent: 15 November 2007 14:17 > > To: cmake@cmake.org > > Subject: Re: [CMake] Setting environment va

Re: [CMake] Applying command to source files

2007-11-15 Thread Mike Jackson
What about looking at the FindQt4.cmake file. Aren't there macros that run 'moc' over a list of files and produce new source code files from that? Might be a good place to start... -- Mike Jackson Senior Research Engineer Innovative Management & Technology Services On Nov 15, 2007, at 3:0

Re: [CMake] CMake and CORBA

2007-11-15 Thread Alexander Neundorf
On Thursday 15 November 2007, Benjamin Behringer wrote: > Hello > > I would like to use the considerable advantages of CMake in our CORBA > project. > Can the configurations be done by CMake or if not is there a way to call > mico-c++ compiler instead of g++ compiler? Stupid question: isn't all yo

Re: [CMake] CMake Book ?

2007-11-15 Thread Leopold Palomo-Avellaneda
A Dimecres 14 Novembre 2007, Bill Hoffman va escriure: > Pau Garcia i Quiles wrote: > > Quoting Bill Hoffman <[EMAIL PROTECTED]>: > >> Juan Sanchez wrote: > >>> I had bought mine a few months ago from kitware directly. > >>> > >>> http://www.kitware.com/products/cmakebook.html > >>> > >>> Their sho

Re: [CMake] Applying command to source files

2007-11-15 Thread Brandon Van Every
On Nov 15, 2007 3:04 PM, Eric Noulard <[EMAIL PROTECTED]> wrote: > I currently lack a command which could give me > all sources files in a directory. FILE(GLOB ... ? Cheers, Brandon Van Every ___ CMake mailing list CMake@cmake.org http://www.cmake.org/m