Re: [CMake] Using WIN32 resource files (with MinGW)

2007-08-27 Thread Christian Ehrlicher
 Von: Dizzy
 An: cmake@cmake.org
 Betreff: [CMake] Using WIN32 resource files (with MinGW)

 Hello
 
 As someone on IRC hinted I added the resource.h/resource.rc files to the 
 project add_executable() source list. However this doesn't seem to work,
 at 
 least with mingw that I am using on Windows (it doesn't seem to be calling
 any command to add the resource file to the project by looking at make 
 VERBOSE=1 and I don't see an icon associated with the executable).
 
 I am very ignorant towards specific Windows programs stuff, I am trying to
 port over cmake something that built with automake on Unices and some
 VS.Net 
 project file on Windows. Is there any documentation describing how to add 
 resource files with cmake? If someone does this already please help.
 
This is a long awaited feature request: 
http://www.cmake.org/Bug/view.php?id=4068

Christian
-- 
Pt! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How to place .dll and .lib in different places?

2007-08-27 Thread Luigi Calori
I have the problem of placing, at build time .lib in one folder (lib) 
and .dll in another (bin)

One solution is to add POST_BUILD copy commands, but i would prefer not.
I have also been suggested to use
SET_TARGET_PROPERTIES ...  PROPERTIES PREFIX
being lib and bin sibling, this hack seem to work:

SET(LIBRARY_OUTPUT_PATH lib)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/)


Is it supported or works by chances?

I ask, because, I have also tried
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/lib)

to being able to have
lib_name.lib in lib/Release
lib_named.lib in lib/Debug

and

liblib_name.dll and liblib_named.dll both in bin

Unfortunately this is working in debug but not in release mode.

Thanks in advance

Luigi



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Is .. supported as PROPERTIES PREFIX ? Was: Re: [CMake] How to get rid of Debug / Release VisualStudio folders?

2007-08-27 Thread Luigi Calori
Following Joshua Jensen suggestion, in order to configure stuff, by 
setting prefix to ../ one seem to being able to direct placement of .dll 
without copying or installing.


I got some inconsistent behaviour between release and Debug build though 
when specifying:


SET_TARGET_PROPERTIES(${TargetName} PROPERTIES PREFIX ../../bin/lib)

Is this a not supported hack or is something one can count on?

Thanks in advance

Luigi


Luigi Calori wrote:


Probably dumb question, but was not able to found hints on docs:
Visual Studio projects generated do append Debug / Release to the 
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths.
Is there a way to avoid this and force them to generate straight 
inside EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths ?


I use the following:

   IF (CMAKE_GENERATOR MATCHES Visual Studio)
   SET_TARGET_PROPERTIES(${TargetName} PROPERTIES PREFIX ../)
   SET_TARGET_PROPERTIES(${TargetName} PROPERTIES DEBUG_POSTFIX 
.debug)

   ENDIF(CMAKE_GENERATOR MATCHES Visual Studio)

It's not perfect, but it backs the executable out a directory.

Josh




___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to place .dll and .lib in different places?

2007-08-27 Thread Alexander Neundorf
On Monday 27 August 2007 06:08, Luigi Calori wrote:
 I have the problem of placing, at build time .lib in one folder (lib)
 and .dll in another (bin)
 One solution is to add POST_BUILD copy commands, but i would prefer not.
 I have also been suggested to use
 SET_TARGET_PROPERTIES ...  PROPERTIES PREFIX
 being lib and bin sibling, this hack seem to work:

 SET(LIBRARY_OUTPUT_PATH lib)
 SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/)


 Is it supported or works by chances?

 I ask, because, I have also tried
 SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/lib)

 to being able to have
 lib_name.lib in lib/Release
 lib_named.lib in lib/Debug

 and

 liblib_name.dll and liblib_named.dll both in bin

 Unfortunately this is working in debug but not in release mode.

Do you really need this in the build tree or only in the install tree ?
Then you should use something like this:

install(TARGETS ${LIB_NAME} RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] FindwxWidgets maintainer

2007-08-27 Thread Mathieu Malaterre
Hi,

  I am trying to use FindwxWidgets in the latest cmake and it seems it
is not backward compatible. The cmake code is trying to do something
like:

$ wx-config --libs gl,adv

  But at least on my machine this is returning an error. One should run instead:

$ wx-config --libs
-pthread -lwx_gtk-2.4

Using:

$ wx-config --version
2.4.2


OS: debian sarge.

Thanks,
-- 
Mathieu
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to place .dll and .lib in different places?

2007-08-27 Thread Luigi Calori

Alexander Neundorf wrote:


On Monday 27 August 2007 09:00, Luigi Calori wrote:
 


Alexander Neundorf wrote:
   


On Monday 27 August 2007 06:08, Luigi Calori wrote:
 


I have the problem of placing, at build time .lib in one folder (lib)
and .dll in another (bin)
One solution is to add POST_BUILD copy commands, but i would prefer not.
I have also been suggested to use
SET_TARGET_PROPERTIES ...  PROPERTIES PREFIX
being lib and bin sibling, this hack seem to work:

SET(LIBRARY_OUTPUT_PATH lib)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/)


Is it supported or works by chances?

I ask, because, I have also tried
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/lib)

to being able to have
lib_name.lib in lib/Release
lib_named.lib in lib/Debug

and

liblib_name.dll and liblib_named.dll both in bin

Unfortunately this is working in debug but not in release mode.
   


Do you really need this in the build tree or only in the install tree ?
Then you should use something like this:
 


We already have it in the install tree, and is working properly.
I was trying to have the same structure on the build tree without
installing, and possibly without adding POST_BUILD custom commands
   



This is not supported.
Do you really need this ?
 

I' ve been asked by the main developer to assemble a build layout that 
was resembling the install layout, so to being able to let users to test 
and play without installing.
I found on the docs that there is a TARGET property called IMPORT_PREFIX 
that can direct the placement of .lib files.
I have found that is possible to use the ../ to specify placement 
outside Debug and Release
The problem comes when I want  to use the library created with something 
like
   TARGET_LINK_LIBRARIES(${TRGTNAME} optimized ${LINKLIB} debug 
${LINKLIB}${CMAKE_DEBUG_POSTFIX})
It seems that in debug mode, the names are expanded based on the target 
name while in release they are taken fron the .dll stuff (PREFIX)


Is it possible that this is related to me using .. in PREFIX?

Thanks
  Luigi


Alex


 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] check_cxx_compiler_flag() doesn't work with cl.exe/rc.exe

2007-08-27 Thread Dizzy
Hello

I use check_cxx_compiler_flag(-ansi -pedantic) to try to use these flags where 
they are valid. However when using nmake makefiles generator cmake doesn't 
seem to detect that cl.exe doesn't need them (I noticed cl.exe doesn't error 
but warns on using those flags but this still means the compiler doesn't 
support them, not to mention it creates tons of redundant warnings about 
those flags).

Second issue is with rc.exe. When adding a .rc file to add_executable() it 
appears that cmake tries to use rc.exe for it passing all compiler arguments 
it used before. While cl.exe warns on unknown flags, rc.exe errors and as 
such I cannot build my project with nmake makefiles generator. Of course I 
could add an if(MSVC) but that would beat the purpose of 
check_cxx_compiler_flag() I believe. Is this a known issue or something I 
missed?

Thank you.

PS: I noticed people posting on the list useful scripts for cmake, is this a 
good way to do so? I have some scripts I would like to share with the others

-- 
Mihai RUSU  Email: [EMAIL PROTECTED]
GPG : http://dizzy.roedu.net/dizzy-gpg.txt  WWW: http://dizzy.roedu.net
Linux is obsolete -- AST
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Programs linked to .a or .so libraries?

2007-08-27 Thread Convey Christian J NPRI
On Linux, I'm building a program that is linked against the ncurses
library.  

In CMake, what decides whether my program will be linked to libcurses.a or
to libcurses.so ?

I'd like to minimize external dependencies in the build program, so whenever
possible I'd like to link to the .a version.  But if nothing else I need to
know which version (static vs. dynamic) of a given library my program is
linked to.

Thanks,
Christian



smime.p7s
Description: S/MIME cryptographic signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

[CMake] (no subject)

2007-08-27 Thread Convey Christian J NPRI
On Linux, I'm building a program that is linked against the ncurses
library.  

In CMake, what decides whether my program will be linked to libcurses.a or
to libcurses.so ?

I'd like to minimize external dependencies in the build program, so whenever
possible I'd like to link to the .a version.  But if nothing else I need to
know which version (static vs. dynamic) of a given library my program is
linked to.

Thanks,
Christian
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Re: New CMake modules for a large variety of BLAS/LAPACK API implementations.

2007-08-27 Thread Alan W. Irwin

Since the development of FindBlas.cmake and FindLAPACK.cmake has been
sporadic with three different developers involved, I thought I should review
the history here, and then make comments on where we stand at the moment.

On 2007-01-25 23:41-0800 Alan W. Irwin wrote:


The FreeEOS project has a number of users that use a variety of different
lapack-related libraries which are named in a variety of ways. Because the
FindBLAS.cmake and FindLAPACK.cmake modules provided by Jan Woetzel at
http://www.mip.informatik.uni-kiel.de/~jw/cmake/CMakeModules/ do not deal
with this library name issue I started again from scratch following the
approach used in the standard autoconf macros that can be found at
http://ac-archive.sourceforge.net/ac-archive/acx_blas.html and
http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html.  My new CMake
modules not only search in turn for the ATLAS, PhiPACK, Alpha CXML, Alpha
DXML, Sun Performance, SCSL, SGIMATH, IBM ESSL, and generic forms of the
libraries, but if those libraries exist, test if they link with the fortran
compiler that has been chosen.

For those of you with an interest in BLAS or LAPACK, please try the new
FindBLAS.cmake and FindBLAS.cmake (FindLapack.cmake) modules (and the
CheckFortranFunctionExists.cmake module that defines a macro used by both of
them) which can be found at
http://freeeos.cvs.sourceforge.net/freeeos/freeeos/cmake/modules/.  The tail
end of the free_eos.cmake module from that same location shows how fortran
is set up and the new modules used.


Since that post, David Thompson sent me a patch for Mac OS X which I
applied, and FreeEOS has been changed over to svn control so the new location
is http://freeeos.svn.sourceforge.net/viewvc/freeeos/trunk/cmake/modules/.

Today, Alin M Elena sent heavily modified versions of FindBLAS.cmake and
FindLAPACK.cmake to the list that appear to be greatly improved in their
ability to deal with more LAPACK/BLAS possibilities. (The
CheckFortranFunctionExists.cmake included with that post is unmodified from
the version at the above location.)

It appears Alin and I have the common goal to donate our work on
FindBLAS.cmake, FindLAPACK.cmake, and CheckFortranFunctionExists.cmake to
cmake so the question appears to be the best way to do that.

Alin, my LAPACK/BLAS knowledge appears to be more limited than yours since
you have added a lot to what I just copied from the existing autoconf macro
knowledge of LAPACK/BLAS systems.  Therefore, I think you are the logical
person to apply to be the maintainer of at least FindBLAS.cmake,
FindLAPACK.cmake and probably CheckFortranFunctionExists.cmake as well.
However, if you don't want to be the maintainer, I guess I would be willing
although I only have experience with LAPACK/BLAS on just one system so I
would have to rely on a lot of knowledge from others.

To apply to be a module maintainer (with CMake cvs write access for modules)
my understanding from Bill Hoffman's July 25 post to this list is you should
post your application to this list with [New Module] in the subject line.

Alin, please let me know what you decide about the module maintainer
question for FindBLAS.cmake, FindLAPACK.cmake, and
CheckFortranFunctionExists.cmake.  However, this is decided, I am looking
forward to these modules becoming part of CMake.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Re: string replacement without external commands help (ex. sed)

2007-08-27 Thread Matthew Woehlke

Dizzy wrote:

Short version:
Is there some built-in support in cmake for string replacement in files (ie to 
generate a file from another by replacing a given string with another, 
similar to configure_file() but more general) and could this string 
replacement operation be used as a command for add_custom_command() ?


Long version:
[snip]
I noticed that configure_file() can be used to generate a file from another by 
replacing variable placeholders. It may not be as general as using sed to 
replace any string sequence but we could make it work (initially we could 
modify project.conf.in to have variable placehoders and use configure_file() 
to replace them). But then I have no idea how to use configure_file() from 
within add_custom_command() as I understand the later wants external commands 
to execute.


Why do you need to use CONFIGURE_FILE in a custom command? If you 
absolutely MUST do this, you can always FILE(WRITE ...) a cmake script 
and run that in your custom command.


--
Matthew
Microsoft: driving people fscking insane...

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake