fabio Posted December 10, 2018 Report Share Posted December 10, 2018 19 hours ago, stanislas69 said: @fabio I looked at using the libpng we compile for OSX however they don't seem to have a flag to specify the path of such a library, and they do some stuff with it because it's not compatible out of the box. Could you assist me with the flags ? I would first move building libpng (around L376) before wxwidgets (L335). Then replace --with-png=builtin wxwidgets compile option with --with-libpng=sys . It probably will fail because it will search in standard system location. Then try to change the wxwidgets CPPFLAGS from CPPFLAGS="-stdlib=libc++ ... to something like CPPFLAGS="-Irelative/path/to/just/compiled/libpng/headers -stdlib=libc++ ... and LDFLAGS from LDFLAGS="$LDFLAGS" to LDFLAGS="-Lrelative/path/to/just/compiled/libpng/lib $LDFLAGS" . EDIT: it should be similar to what done on sdl2 with iconv (L293). 2 Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 10, 2018 Report Share Posted December 10, 2018 @fabio Thanks, I just checked, and for some reason I didn't have to do the cpp flags changing so I guess I had some cached stuff, I just launched a full rebuild to check. Quote Link to comment Share on other sites More sharing options...
fabio Posted December 10, 2018 Author Report Share Posted December 10, 2018 Without changing cppflags it may includes different headers than the ones of the library and problems may arise... Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 10, 2018 Report Share Posted December 10, 2018 8 minutes ago, fabio said: Without changing cppflags it may includes different headers than the ones of the library and problems may arise... Yeah I was surprised it worked. Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 11, 2018 Report Share Posted December 11, 2018 @fabio So I tried, and it didn't work. Reference for flags https://raw.githubusercontent.com/wxWidgets/wxWidgets/master/configure (Might be some we can add) If I pass --with-libpng=sys, he says: system png library not found or too old! Use --with-libpng=builtin to use built-in version" Full command CONF_OPTS="--prefix=$INSTALL_DIR --disable-shared --enable-macosx_arch=$ARCH --enable-unicode --with-cocoa --with-opengl --with-libiconv-prefix=${ICONV_DIR} --with-expat=builtin --with-libpng --without-libtiff --without-sdl --without-x --disable-webview --disable-webkit --disable-webviewwebkit --disable-webviewie" # wxWidgets configure now defaults to targeting 10.5, if not specified, # but that conflicts with our flags if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then CONF_OPTS="$CONF_OPTS --with-macosx-version-min=$MIN_OSX_VERSION" fi (../configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" CPPFLAGS="-L$LIB_PNG_DIR/include -stdlib=libc++ -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" LDFLAGS="-L$LIB_PNG_DIR/lib $LDFLAGS" $CONF_OPTS && make ${JOBS} && make install) || die "wxWidgets build failed" I also tried --with-libpng=$LIB_PNG_DIR Fails like above. I ended up passing --with-libpng And it built complaining about clang: warning: argument unused during compilation: '-L/Users/Stan/0ad/libraries/osx/libpng/include So I guess it's not working either... Quote Link to comment Share on other sites More sharing options...
fabio Posted December 12, 2018 Author Report Share Posted December 12, 2018 CPPFLAGS="-L$LIB_PNG_DIR/include That -L should be -I Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 12, 2018 Report Share Posted December 12, 2018 Ah thanks Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 13, 2018 Report Share Posted December 13, 2018 I tried again and it compiled but I'm not sure everything went smoothly could you check @fabio Buildlog.txt OSX-Lib.diff Quote Link to comment Share on other sites More sharing options...
fabio Posted December 13, 2018 Author Report Share Posted December 13, 2018 The patch has a lot of whitespace changes, so it is not readable... The buildlog seems fine to me. I suppose jpeg support is not needed within wx (was also removed from the game itself), correct? Then it could also be disabled with --with-libjpeg=no . Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 13, 2018 Report Share Posted December 13, 2018 I'll try with that flag @fabio and report back. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.