Hi, I'm trying to cross compile Hugin on OSX via cmake (to make a universal bundle via my cmake scripted route). To do that I use the following cmake command:
cmake \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX="$REPOSITORYDIR/arch/$ARCH" \ -DCMAKE_OSX_ARCHITECTURES="$TARGET" \ -DCMAKE_OSX_SYSROOT="$MACSDKDIR" \ -DCMAKE_C_FLAGS_RELEASE="-isysroot $MACSDKDIR -mmacosx-version-min=10.4 -arch $ARCH -O2 -dead_strip -I/usr/include -I$REPOSITORYDIR/include" \ -DCMAKE_CXX_FLAGS_RELEASE="-isysroot $MACSDKDIR -mmacosx-version-min=10.4 -arch $ARCH -O2 -dead_strip -I/usr/include -I$REPOSITORYDIR/include" \ -DCMAKE_LDFLAGS="-L/usr/lib -L$REPOSITORYDIR/lib -dead_strip -Wl,-syslibroot -Wl,$MACSDKDIR" \ -DEXIV2_INCLUDE_DIR=$REPOSITORYDIR/include \ -DEXIV2_LIBRARIES=$REPOSITORYDIR/lib/libexiv2.a \ -DOPENEXR_INCLUDE_DIR=$REPOSITORYDIR/include/OpenEXR \ ..; Please note that some of the variables are filled in during runtime, so please don't pay attention to those: They work! It is in the statement: -arch $ARCH (during runtime $ARCH is substituted with ppc and i386 per run) During the cmake process (or during runtime) it is replaced by -arch -lppc giving the following error: c++-4.0: Invalid arch name : -lppc (See listing below this mail) To prevent the -arch $ARCH to be separated I also tried \"-arch $ARCH\", but that doesn't make a difference. Where is the (CFLAG/CXXFLAG) statement -arch <architecture> mutilated to -arch -lppc. It should stay -arch ppc (or -arch i386 for that matter). I did try to find where this is done and my guess is now that it's done in "HuginMacros.cmake" but I don't know how to change the behaviour (or whether it is really there). I also tried with other cmake based sources but they work fine. It is the Hugin cmake proces. Can someone confirm this behaviour? (one of the developers?) I was about to file a bug, but it's maybe better to know what happens before I do. Harry *src/hugin1/hugin/CMakeFiles/Hugin.dir/build.make:* cd /Users/Shared/development/hugin_related/hugin/ppc/src/hugin1/hugin && /usr/bin/c++ -flat_namespace -undefined suppress -I/Users/Shared/development/hugin_related/ExternalPrograms/repository/arch/ppc/lib/wx/include/mac-unicode-release-2.8 -I/Users/Shared/development/hugin_related/ExternalPrograms/repository/include/wx-2.8 -O3 -DNDEBUG -headerpad_max_install_names -fPIC -flat_namespace -undefined suppress $(Hugin_OBJECTS) $(Hugin_EXTERNAL_OBJECTS) -o Hugin.app/Contents/MacOS/Hugin -L/Users/Shared/development/hugin_related/hugin/ppc/src/hugin_base -L/Users/Shared/development/hugin_related/hugin/ppc/src/foreign/jhead -L/Users/Shared/development/hugin_related/hugin/ppc/src/foreign/levmar -L/Users/Shared/development/hugin_related/hugin/ppc/src/foreign/vigra/vigra_impex -L/Users/Shared/development/hugin_related/hugin/ppc/src/hugin1/base_wx -L/Users/Shared/development/hugin_related/hugin/ppc/src/celeste -L/Users/Shared/development/hugin_related/ExternalPrograms/repository/lib -L/Users/Shared/development/hugin_related/ExternalPrograms/repository/arch/ppc/lib -lhuginbase -lhuginjhead -lboost_thread -lpano13 -lhuginlevmar -lhuginvigraimpex -lImath -lIlmImf -lIex -lHalf -lIlmThread -ljpeg -ltiff -lpng -lz -lz -lexiv2 -lhuginbasewx -lceleste -L/Users/Shared/development/hugin_related/ExternalPrograms/repository/arch/ppc/lib *-arch -lppc*-L/Users/Shared/development/hugin_related/ExternalPrograms/repository/lib -dead_strip -prebind -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL -lwx_macu_gl-2.8 -lwx_macu-2.8 -framework AGL -framework OpenGL -lGLEW --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group. A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/hugin-ptx -~----------~----~----~----~------~----~------~--~---
