Re: [CMake] OSX Leopard- compiling for Tiger and later

2008-07-02 Thread Eric Torstenson

 what happens if you just set the CMAKE_OSX_SYSROOT variable to the  
 10.4u sdk? Is that enough?
 

Thanks to Sean's previous post, I set the following variables:
IF (APPLE) 
SET (CMAKE_OSX_ARCHITECTURES i386)#x86_64 ppc ppc64
SET (CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
END (APPLE)

This results in the right version of the compiler being called. I haven't 
finished compiling it, 
due to other dependencies, so we will see if that works once I get those ironed 
out. 

There was a reference to a deployment variable, which might be what the article 
from sean's 
post was requesting. However, I'm not sure if I'll need that once I get all the 
way to linking or
not.

eric
 
 -- 
 Mike Jackson   Senior Research Engineer
 Innovative Management  Technology Services
 
 
 On Jul 2, 2008, at 1:47 PM, Sean McBride wrote:
 
 On 7/2/08 12:37 PM, Eric Torstenson said:

 Is there any cmake functionality to aid with targeting tiger from
 leopard machines (with xcode 2.5 installed)

 Do you have both Xcode 3.1 and 2.5 installed?  I'm not sure how well
 CMake handles that...

 But to target Tiger, one needs to set the deployment target.  CMake  
 has
 no setting for this, see:
 

 But the workaround is simple (and in the bug).

 -- 
 
 Sean McBride, B. Eng [EMAIL PROTECTED]
 Rogue Researchwww.rogue-research.com
 Mac Software Developer  Montréal, Québec, Canada


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

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

_
Enter the Zune-A-Day Giveaway for your chance to win — day after day after day
http://www.windowslive-hotmail.com/ZuneADay/?locale=en-USocid=TXT_TAGLM_Mobile_Zune_V1
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] linking static libraries

2008-05-30 Thread Eric Torstenson

Hi All,

I'm running an application that uses a handful of semi-standard 
libraries (freetype, libpng, zlib). Before I switched over to cmake, I 
was linking to the static version of those libraries, and my app seemed 
to run fine on machines as long as it was a recent version of linux.


However, since I've switched to cmake, I've begun getting complaints 
that the binaries are no longer compatible. They are getting floating 
point exceptions just running it without arguments (which just prints 
out the typical help stuff).


The most likely culprit is an .so file that isn't quite right.

I've gone over the manual, but I don't see a way to tell 
TARGET_LINK_LIBRARIES to prefer static over dynamic? I really can't ask 
these folks to recompile the software, since we are talking about 5 or 6 
dependancies (including cmake itself, since I'm using 2.7)


Thanks for any help,

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


[CMake] wxWidgets, cmake and parallels msys is confused

2008-05-09 Thread Eric Torstenson

Hi all,

This is pretty weird, and most certainly due to the complex arrangement 
of the system I'm compiling things on.


First, I'm building the application using parallels running msys. The 
machine it's ultimately running on is a macbook pro, which has wxWidgets 
installed on as well.


When I don't define WIN32 on an msys build which needs to include and 
link to wxWidgets libraries, it magically is finding my mac's installed 
wx-config and uses those include paths-which don't map properly 
(luckily, since I don't think they would be appropriate for the build). 
What's cool is that msys


Is there a way to tell CMake to use the wx-config that is in the system 
path? If I do which wx-config, it returns the appropriate one.


Thanks for any help! If there is something I've done to confuse the 
module, please let me know!


FWIW, here is some info to show that it should find the one installed:

$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/mingw/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/mingw/bin:/c/msys/1.0.10/bin:/c/Program 
Files/CMake/bin:/c/WATCOM/BINNT:/c/WATCOM/BINW:/c/boost/bin


 Errors when I build 
---

make[3]: Entering directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: Leaving directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: Entering directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: *** No rule to make target 
`/usr/local/include/wx-2.8/wx/mac/accel.h', needed by 
`src/wxgenomesimla/CMakeFiles/wxGenomeSIMLA.dir/appcontroller.cpp.obj'.  
Stop.


 Where it really should be found 
-

$ which wx-config
/usr/local/bin/wx-config

$ /usr/local/bin/wx-config --cflags
-I/usr/local/lib/wx/include/msw-ansi-release-static-2.8 
-I/usr/local/include/wx-2.8 -D__WXMSW__ -mthreads


- The one being found (I think) How it finds 
it, I'm not sure, since /z is nowhere to be found in my PATH

$ /z/usr/local/bin/wx-config --cflags
-I/usr/local/lib/wx/include/mac-ansi-release-static-2.8 
-I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES 
-D__WXMAC__



Something else that is weird, and is probably just an oddity of the msys 
environment, is that find / -name wx-config -print will show 
/local/bin/wx-config and neither of the two listed above. What I can 
tell from looking at the output of that file is that it's a link of some 
kind to the correct one or at least the same version (it reports the 
same information that the /usr/local/bin/wx-config does).


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


Re: [CMake] wxWidgets, cmake and parallels msys is confused

2008-05-09 Thread Eric Torstenson

Werner Smekal wrote:

Hi,

I needed some time to understand your setup :), but four things come 
into my mind:
Yeah, as I was writing this message, it started looking like maybe that 
alone was making things worse, lol.


1) Is it possible that you have some old cmake config files left 
somewhere from a cmake configuration on the mac, since you build your 
program from the source which is on /z which I believe is the mounted 
Mac OS X partition? If you have such stale files left that might be 
the reason of this misconfiguration. Remove the build directory 
completely and start from scratch again. Check the source tree if 
there is some file there which doesn't belong there.
This seems to have been the problem. I am using out of source builds, 
but until I did a complete copy of the source dir, even starting a new 
place to build in, I still got the wxMac error. Something must be jammed 
up inside the real source directory.


2) Just to make sure - copy the source files into your virtual 
partition and run the build again. In addition you could unmount z: so 
it msys can't find wx-config from Mac OS X in any case.
I didn't even have to unmount anything. Copying the source (without any 
CMake stuff other than CMakeLists.txt files) did the job.

4) Get VirtualBox :) and drop Parallels.
Hm, I hadn't heard of this. I think I'm going to move to an old copy of 
visual studio and see if that fixes my weirdnesses that were causing me 
to want to compile without WIN32 (the current one is just too big to run 
on my laptop under parallels). After thinking about it a bit, I'm using 
some prebuilt stuff and some that I compiled with MSYS and MingW. I am 
pretty sure that this sort of mishmash is a recipe for disaster, without 
the WIN32 being defined.


HTH,
Werner

Eric Torstenson wrote:

Hi all,

This is pretty weird, and most certainly due to the complex 
arrangement of the system I'm compiling things on.


First, I'm building the application using parallels running msys. The 
machine it's ultimately running on is a macbook pro, which has 
wxWidgets installed on as well.


When I don't define WIN32 on an msys build which needs to include and 
link to wxWidgets libraries, it magically is finding my mac's 
installed wx-config and uses those include paths-which don't map 
properly (luckily, since I don't think they would be appropriate for 
the build). What's cool is that msys


Is there a way to tell CMake to use the wx-config that is in the 
system path? If I do which wx-config, it returns the appropriate one.


Thanks for any help! If there is something I've done to confuse the 
module, please let me know!


FWIW, here is some info to show that it should find the one installed:

$ echo $PATH
.:/usr/local/bin:/mingw/bin:/bin:/mingw/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/mingw/bin:/c/msys/1.0.10/bin:/c/Program 
Files/CMake/bin:/c/WATCOM/BINNT:/c/WATCOM/BINW:/c/boost/bin


 Errors when I build 
---

make[3]: Entering directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: Leaving directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: Entering directory `/z/Users/torstees/dev/build/Release/win32'
make[3]: *** No rule to make target 
`/usr/local/include/wx-2.8/wx/mac/accel.h', needed by 
`src/wxgenomesimla/CMakeFiles/wxGenomeSIMLA.dir/appcontroller.cpp.obj'.  
Stop.


 Where it really should be found 
-

$ which wx-config
/usr/local/bin/wx-config

$ /usr/local/bin/wx-config --cflags
-I/usr/local/lib/wx/include/msw-ansi-release-static-2.8 
-I/usr/local/include/wx-2.8 -D__WXMSW__ -mthreads


- The one being found (I think) How it 
finds it, I'm not sure, since /z is nowhere to be found in my PATH

$ /z/usr/local/bin/wx-config --cflags
-I/usr/local/lib/wx/include/mac-ansi-release-static-2.8 
-I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES 
-D__WXMAC__



Something else that is weird, and is probably just an oddity of the 
msys environment, is that find / -name wx-config -print will show 
/local/bin/wx-config and neither of the two listed above. What I can 
tell from looking at the output of that file is that it's a link of 
some kind to the correct one or at least the same version (it reports 
the same information that the /usr/local/bin/wx-config does).


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





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


Re: [CMake] Control Object code destination?

2008-04-25 Thread Eric Torstenson
So, I take it that this isn't possible? Is there a way to make a feature 
request?


It seems to me to be a very important thing to do when developing 
applications on multiple

platforms, which cmake is intended for.

What would be nice is a variable that can be set which would allow the 
developer to tweak or
completely override the object code path. This would allow me to use the 
same sources to
compile for linux 32 bit. Linux 64 bit. Mac OS X and windows as well as 
release/debug versions of
each. While it might seem goofy, it saves on compile time when making 
changes for platform A
and checking that they don't break B,C,D. Keeping your sources in 
separate folders will work,
but keeping them up to date can be a pain. RSync and other things can 
work, but can also be

a point of error if you forget to sync up or whatever.

Another option would be to allow something like configure, where you 
allow the user to specify
where the script is run (such as cd build-dbg; ../configure) I tried 
doing this, but it didn't have

any effect on the make scripts and object code paths.

thanks!

eric
Eric Torstenson wrote:

Hi All,

I'm compiling my application on 4 platforms (linux 32 bit, linux 64 
bit, windows and mac) I would like to use my linux source tree for all 
of them without having to recompile the whole thing each time I change 
from one platform to the next.


Is there a way to do that? I looked at CMAKE_ARCHIVE_OUTPUT_DIRECTORY, 
but it looks like it is the destination of the end products 
themselves, and not the intermediate stuff.


Thanks,

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


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


[CMake] Control Object code destination?

2008-04-23 Thread Eric Torstenson

Hi All,

I'm compiling my application on 4 platforms (linux 32 bit, linux 64 bit, 
windows and mac) I would like to use my linux source tree for all of 
them without having to recompile the whole thing each time I change from 
one platform to the next.


Is there a way to do that? I looked at CMAKE_ARCHIVE_OUTPUT_DIRECTORY, 
but it looks like it is the destination of the end products themselves, 
and not the intermediate stuff.


Thanks,

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


Re: [CMake] CMake 2.4 (8) WxWidgets + RichText Pt 2

2008-04-21 Thread Eric Torstenson

That did the trick (editing the FindwxWidgets.cmake)

Thanks so much!

eric
Alan W. Irwin wrote:
To see what is going on, check the FindwxWidgets.cmake file.  For 
example,

on my Debian testing system with CMake 2.4.8, that file is located at
/usr/share/cmake-2.4/Modules/FindwxWidgets.cmake.  There is a list of
components in that file such as base core adv, etc., but no richtext.  
So I

suggest for cmake-2.4.8 you simply work around the problem for now by
editing that file to add the components you need.

You could also try cmake 2.6.0 (currently RC8).  I notice for that
FindwxWidgets.cmake, the components approach is quite different so 
richtext

may just work.

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


Re: [CMake] CMake 2.4 (8) WxWidgets + RichText Pt 2

2008-04-21 Thread Eric Torstenson

Hi Miguel,

Well, with this in mind, I did a bit of playing, and decided that the 
problem wasn't so much that FindwxWidgets.cmake needed to be changed, 
but instead, I was calling it incorrectly.


What I had to do was as follows:

SET (wxWidgets_USE_LIBS aui richtext adv html core xml base xrc qa net)
SET (wxWidgets_FIND_COMPONENTS true)

FIND_PACKAGE(wxWidgets)
IF (wxWidgets_FOUND)
   INCLUDE (${wxWidgets_USE_FILE})
   #Project name is just the project being built
   TARGET_LINK_LIBRARIES(${ProjectName} ${wxWidgets_LIBRARIES})
ENDIF (wxWidgets_FOUND)

Since, by default, FIND_COMPONENTS is false, it was using what you 
described as the windows mechanism. Which did work after I added those 
two components to the underlying cmakefiles, but what I really needed to 
do was set it up so your module would find them using the other logic.


So, I think I finally got it straightened out.

Thanks,

Eric

Hello Eric,

I'm glad to here this worked. Now, I would like to understand the
problem, so that I can fix the FindwxWidgets module. Can you post
exactly what chages did you make to the FindwxWidgets (a diff patch
would be fine)?

1. In windows, it makes sense to add the richtext lib, because it
relies on it to find all possible libraries. I suppose that you added
it to the following line:

FOREACH(LIB core adv aui html media xrc dbgrid gl qa)

2. In linux/unix, I am returning what the `wx-config --libs libs`
returns. I believe that the problem you were having was due to a
parsing bug, which should be fixed in the latest version. However, the
above list wouldn't have helped. If the latest version still has the
bug, then let me know so that I can explore the issue further.

You can always find a latest version of the module for comparison at:

http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/FindwxWidgets.cmake?root=CMakeview=markup

Thanks in advance for the report,
--Miguel
  


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


[CMake] CMake 2.4 (8) and WxWidgets + RichText

2008-04-18 Thread Eric Torstenson

Hi All,

I've been struggling to get my gui application to compile and link using 
CMake (the command line version went easily enough) and I think it's 
time to ask for some help.


I'm using version 2.8.6 of wx-widgets, and my old makefiles compiled and 
linked the application just fine. However, I've had many problems trying 
to feed the various flags into the compiler myself. So, now I'm trying 
to use the FIND_PACKAGE(wxWidgets) command to let CMake do the work for me.


However, when I do, it doesn't find RichText.

Here is that portion of my CMakeLists.txt file:

FIND_PACKAGE(wxWidgets COMPONENTS aui richtext adv html core xml base 
xrc qa net)

IF (wxWidgets_FOUND)
   MESSAGE (WxWidgets LIB Root :${wxWidgets_ROOT_DIR})
   MESSAGE (WxWidgets LIB Dir  :${wxWidgets_LIB_DIR})
   MESSAGE (WxWidgets CXX Flags:${wxWidgets_CXX_FLAGS})
   MESSAGE (WxWidgets Inc. Dirs:${wxWidgets_INCLUDE_DIRS})
   MESSAGE (wxWidgets Def. :${wxWidgets_DEFINITIONS})
   MESSAGE (wxWidgets Libraries:${wxWidgets_LIBRARIES})


   SET (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${WxTypeCFlags} 
-L/usr/local/lib )
   SET (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ 
-DWXDEBUG=1 ${WxTypeCFlags} -L/usr/local/lib)



   ADD_DEFINITIONS (${wxWidgets_DEFINITIONS})
   INCLUDE_DIRECTORIES (${wxWidgets_INCLUDE_DIR} ${SourceDIR} 
$ENV{rdParty}$/include ${FreeTypeCFlags} ${WxTypeCFlags} -L/usr/local/lib)

   LINK_DIRECTORIES (${wxWidgets_LINK_DIRECTORIES})
   LINK_LIBRARIES (${wxWidgets_LIBRARIES})


ENDIF (wxWidgets_FOUND)

The results of the wxWidgets_LIBRARIES printout are:
wxWidgets Libraries:
-L/usr/local/lib;-pthread;;;-L/usr/lib64;;;/usr/local/lib/libwx_gtk2_aui-2.8.a;/usr/local/lib/libwx_gtk2_xrc-2.8.a;/usr/local/lib/libwx_gtk2_qa-2.8.a;/usr/local/lib/libwx_gtk2_html-2.8.a;/usr/local/lib/libwx_gtk2_adv-2.8.a;/usr/local/lib/libwx_gtk2_core-2.8.a;/usr/local/lib/libwx_base_xml-2.8.a;/usr/local/lib/libwx_base_net-2.8.a;/usr/local/lib/libwx_base-2.8.a;-pthread;-lgtk-x11-2.0;-lgdk-x11-2.0;-latk-1.0;-lgdk_pixbuf-2.0;-lpango-1.0;-lgobject-2.0;-lgmodule-2.0;-lgthread-2.0;-lrt;-lglib-2.0;-lXinerama;-lXxf86vm;-lSM;-lpng;-ljpeg;-ltiff;-lexpat;-lz;-ldl;-lm


There is simply no richtext in there at all:(

When I run wx-config --libs aui richtext adv html core xml base xrc qa net

I get this:
-L/usr/local/lib -pthread   -L/usr/lib64   
/usr/local/lib/libwx_gtk2_aui-2.8.a 
/usr/local/lib/libwx_gtk2_richtext-2.8.a 
/usr/local/lib/libwx_gtk2_adv-2.8.a /usr/local/lib/libwx_gtk2_html-2.8.a 
/usr/local/lib/libwx_gtk2_core-2.8.a /usr/local/lib/libwx_base_xml-2.8.a 
/usr/local/lib/libwx_base-2.8.a /usr/local/lib/libwx_gtk2_xrc-2.8.a 
/usr/local/lib/libwx_gtk2_qa-2.8.a /usr/local/lib/libwx_base_net-2.8.a 
-pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 
-lXinerama -lXxf86vm -lSM -lpng -ljpeg -ltiff -lexpat -lz -ldl -lm


I should be able to get the richtext as a component. I don't know how 
CMake is finding this, but the paths are correct, so they are using the 
correct installation, I think.


I tried to manually set the various flags, but I was having all sorts of 
issues there, so I thought it was best to go according to the way that 
seems to be provided.


Thanks any help!

eric


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


[CMake] CMake 2.4 (8) WxWidgets + RichText Pt 2

2008-04-18 Thread Eric Torstenson
I managed to find the ultimate cause of manual assignment using 
wx-config and CMAKE_CXX_FLAGS. This is what I was trying to do 
originally, but never had a successful link. This is directly calling 
wx-config myself, and then attempting to pass the results to the 
linker call.


When I add them in my WxWidgets.cmake file, the various linker stuff 
goes in front of the objects. I guess, since it's a static build of 
wxWidgets, those libs are thrown away before I ever have a need for 
them. I've moved the INCLUDE command so that the inclusion occurs after 
the ADD_EXECUTABLE command is made, but I still can't get it to link, 
due to the .a files being strewn at the front of the line. If I were 
using a dynamic version of the libraries, it would probably work, but I 
don't want those dependencies, since we share our binaries with other labs.


Is there something I can do to rearrange the order these flags are added 
to the link step? Also, is there a way to get access to the actual line 
that will be sent to the linker? I hate for these to be sent to the 
compiler too, since there are quite a few.


Also, in case it makes a difference, this is Linux with gcc 4.1.2

Thanks again,

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