diff --git a/linux/Makefile b/linux/Makefile index 1b8f583..2bba710 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -181,20 +181,6 @@ $(DOWNLOADS)/libpng/Makefile: $(DOWNLOADS)/libpng/configure $(DOWNLOADS)/libpng/configure: $(CLONE) $(GITHUB)/mkxp-z/libpng $(DOWNLOADS)/libpng -# libjpeg -libjpeg: init_dirs $(LIBDIR)/libjpeg.a - -$(LIBDIR)/libjpeg.a: $(DOWNLOADS)/libjpeg/cmakebuild/Makefile - cd $(DOWNLOADS)/libjpeg/cmakebuild; \ - make -j$(NPROC); make install - -$(DOWNLOADS)/libjpeg/cmakebuild/Makefile: $(DOWNLOADS)/libjpeg/CMakeLists.txt - cd $(DOWNLOADS)/libjpeg; mkdir -p cmakebuild; cd cmakebuild; \ - $(CMAKE) -DENABLE_SHARED=no -DENABLE_STATIC=yes - -$(DOWNLOADS)/libjpeg/CMakeLists.txt: - $(CLONE) $(GITHUB)/mkxp-z/libjpeg-turbo $(DOWNLOADS)/libjpeg - # SDL2 sdl2: init_dirs $(LIBDIR)/libSDL2.a @@ -212,26 +198,29 @@ $(DOWNLOADS)/sdl2/configure: $(DOWNLOADS)/sdl2/autogen.sh $(DOWNLOADS)/sdl2/autogen.sh: $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z -# SDL2 (Image) -sdl2image: init_dirs sdl2 libpng libjpeg $(LIBDIR)/libSDL2_image.a +# SDL_image +sdl2image: init_dirs sdl2 $(LIBDIR)/libSDL2_image.a -$(LIBDIR)/libSDL2_image.a: $(DOWNLOADS)/sdl2_image/Makefile - cd $(DOWNLOADS)/sdl2_image; \ +$(LIBDIR)/libSDL2_image.a: $(DOWNLOADS)/sdl2_image/cmakebuild/Makefile + cd $(DOWNLOADS)/sdl2_image/cmakebuild; \ make -j$(NPROC); make install -$(DOWNLOADS)/sdl2_image/Makefile: $(DOWNLOADS)/sdl2_image/configure +$(DOWNLOADS)/sdl2_image/cmakebuild/Makefile: $(DOWNLOADS)/sdl2_image/CMakeLists.txt + cd $(DOWNLOADS)/sdl2_image; mkdir -p cmakebuild; cd cmakebuild; \ + $(CMAKE) \ + -DBUILD_SHARED_LIBS=no \ + -DSDL2IMAGE_JPG_SAVE=yes \ + -DSDL2IMAGE_PNG_SAVE=yes \ + -DSDL2IMAGE_PNG_SHARED=no \ + -DSDL2IMAGE_JPG_SHARED=no \ + -DSDL2IMAGE_JXL=yes \ + -DSDL2IMAGE_JXL_SHARED=no \ + -DSDL2IMAGE_VENDORED=yes + +$(DOWNLOADS)/sdl2_image/CMakeLists.txt: + $(CLONE) $(GITHUB)/mkxp-z/SDL_image $(DOWNLOADS)/sdl2_image -b mkxp-z; \ cd $(DOWNLOADS)/sdl2_image; \ - LIBPNG_LIBS="-L$(LIBDIR) -lpng" LIBPNG_CFLAGS="-I$(INCLUDEDIR)" \ - $(CONFIGURE) --enable-static=true --enable-shared=false \ - --enable-png=yes --enable-png-shared=no \ - --enable-jpg=yes --enable-jpg-shared=no \ - --enable-webp=no $(SDL2_IMAGE_FLAGS) - -$(DOWNLOADS)/sdl2_image/configure: $(DOWNLOADS)/sdl2_image/autogen.sh - cd $(DOWNLOADS)/sdl2_image; ./autogen.sh - -$(DOWNLOADS)/sdl2_image/autogen.sh: - $(CLONE) $(GITHUB)/mkxp-z/SDL_image_old $(DOWNLOADS)/sdl2_image -b mkxp-z + ./external/download.sh # SDL_sound sdlsound: init_dirs sdl2 libogg libvorbis $(LIBDIR)/libSDL2_sound.a @@ -353,5 +342,5 @@ powerwash: clean-downloads clean-downloads: -rm -rf downloads -deps-core: libtheora libvorbis pixman libpng libjpeg physfs sdl2 sdl2image sdlsound sdl2ttf openal openssl fluidsynth uchardet iconv +deps-core: libtheora libvorbis pixman libpng physfs sdl2 sdl2image sdlsound sdl2ttf openal openssl fluidsynth uchardet iconv everything: deps-core ruby diff --git a/macos/Dependencies/common.make b/macos/Dependencies/common.make index 3c615a2..9ae4614 100644 --- a/macos/Dependencies/common.make +++ b/macos/Dependencies/common.make @@ -208,7 +208,9 @@ $(DOWNLOADS)/sdl2_image/cmakebuild/Makefile: $(DOWNLOADS)/sdl2_image/CMakeLists. -DSDL2IMAGE_JPG_SAVE=yes \ -DSDL2IMAGE_PNG_SAVE=yes \ -DSDL2IMAGE_PNG_SHARED=no \ - -DSDL2IMAGE_JPG_SHARED=no \ + -DSDL2IMAGE_JPG_SHARED=no \ + -DSDL2IMAGE_JXL=yes \ + -DSDL2IMAGE_JXL_SHARED=no \ -DSDL2IMAGE_BACKEND_IMAGEIO=no diff --git a/src/meson.build b/src/meson.build index df48105..487b65b 100755 --- a/src/meson.build +++ b/src/meson.build @@ -8,10 +8,9 @@ sdl2 = dependency('SDL2', static: build_static) sdl_sound = compilers['cpp'].find_library('SDL2_sound') sdl2_ttf = dependency('SDL2_ttf', static: build_static) freetype = dependency('freetype2', static: build_static) -sdl2_image = dependency('SDL2_image', static: build_static) +sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static']) pixman = dependency('pixman-1', static: build_static) png = dependency('libpng', static: build_static) -jpeg = dependency('libjpeg', static: build_static) zlib = dependency('zlib', static: build_static) uchardet = dependency('uchardet', static: build_static) @@ -83,7 +82,7 @@ global_include_dirs += include_directories('.', 'util', 'util/sigslot', 'util/sigslot/adapter' ) -global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, jpeg, iconv, uchardet] +global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, iconv, uchardet] if host_system == 'windows' global_dependencies += compilers['cpp'].find_library('wsock32') endif diff --git a/windows/Makefile b/windows/Makefile index 8dc30f7..997dcf9 100755 --- a/windows/Makefile +++ b/windows/Makefile @@ -151,20 +151,6 @@ $(DOWNLOADS)/libpng/Makefile: $(DOWNLOADS)/libpng/configure $(DOWNLOADS)/libpng/configure: $(CLONE) $(GITHUB)/mkxp-z/libpng $(DOWNLOADS)/libpng -# libjpeg -libjpeg: init_dirs $(LIBDIR)/libjpeg.a - -$(LIBDIR)/libjpeg.a: $(DOWNLOADS)/libjpeg/cmakebuild/Makefile - cd $(DOWNLOADS)/libjpeg/cmakebuild; \ - make -j$(NPROC); make install - -$(DOWNLOADS)/libjpeg/cmakebuild/Makefile: $(DOWNLOADS)/libjpeg/CMakeLists.txt - cd $(DOWNLOADS)/libjpeg; mkdir -p cmakebuild; cd cmakebuild; \ - $(CMAKE) -DENABLE_SHARED=no -DENABLE_STATIC=yes - -$(DOWNLOADS)/libjpeg/CMakeLists.txt: - $(CLONE) $(GITHUB)/mkxp-z/libjpeg-turbo $(DOWNLOADS)/libjpeg - # uchardet uchardet: init_dirs $(LIBDIR)/libuchardet.a @@ -197,26 +183,29 @@ $(DOWNLOADS)/sdl2/configure: $(DOWNLOADS)/sdl2/autogen.sh $(DOWNLOADS)/sdl2/autogen.sh: $(CLONE) $(GITHUB)/mkxp-z/SDL $(DOWNLOADS)/sdl2 -b mkxp-z -# SDL2 (Image) -sdl2image: init_dirs sdl2 libpng libjpeg $(LIBDIR)/libSDL2_image.a +# SDL_image +sdl2image: init_dirs sdl2 $(LIBDIR)/libSDL2_image.a -$(LIBDIR)/libSDL2_image.a: $(DOWNLOADS)/sdl2_image/Makefile - cd $(DOWNLOADS)/sdl2_image; \ +$(LIBDIR)/libSDL2_image.a: $(DOWNLOADS)/sdl2_image/cmakebuild/Makefile + cd $(DOWNLOADS)/sdl2_image/cmakebuild; \ make -j$(NPROC); make install -$(DOWNLOADS)/sdl2_image/Makefile: $(DOWNLOADS)/sdl2_image/configure +$(DOWNLOADS)/sdl2_image/cmakebuild/Makefile: $(DOWNLOADS)/sdl2_image/CMakeLists.txt + cd $(DOWNLOADS)/sdl2_image; mkdir -p cmakebuild; cd cmakebuild; \ + $(CMAKE) \ + -DBUILD_SHARED_LIBS=no \ + -DSDL2IMAGE_JPG_SAVE=yes \ + -DSDL2IMAGE_PNG_SAVE=yes \ + -DSDL2IMAGE_PNG_SHARED=no \ + -DSDL2IMAGE_JPG_SHARED=no \ + -DSDL2IMAGE_JXL=yes \ + -DSDL2IMAGE_JXL_SHARED=no \ + -DSDL2IMAGE_VENDORED=yes + +$(DOWNLOADS)/sdl2_image/CMakeLists.txt: + $(CLONE) $(GITHUB)/mkxp-z/SDL_image $(DOWNLOADS)/sdl2_image -b mkxp-z; \ cd $(DOWNLOADS)/sdl2_image; \ - LIBPNG_LIBS="-L$(LIBDIR) -lpng" LIBPNG_CFLAGS="-I$(INCLUDEDIR)" \ - $(CONFIGURE) --enable-static=true --enable-shared=false \ - --enable-png=yes --enable-png-shared=no \ - --enable-jpg=yes --enable-jpg-shared=no \ - --enable-webp=no $(SDL2_IMAGE_FLAGS) - -$(DOWNLOADS)/sdl2_image/configure: $(DOWNLOADS)/sdl2_image/autogen.sh - cd $(DOWNLOADS)/sdl2_image; ./autogen.sh - -$(DOWNLOADS)/sdl2_image/autogen.sh: - $(CLONE) $(GITHUB)/mkxp-z/SDL_image_old $(DOWNLOADS)/sdl2_image -b mkxp-z + ./external/download.sh # SDL_sound sdlsound: init_dirs sdl2 libogg libvorbis $(LIBDIR)/libSDL2_sound.a @@ -341,5 +330,5 @@ powerwash: clean-downloads clean-downloads: -rm -rf downloads -deps-core: libtheora libvorbis pixman libpng libjpeg physfs sdl2 sdl2image sdlsound sdl2ttf openal openssl fluidsynth uchardet +deps-core: libtheora libvorbis pixman libpng physfs sdl2 sdl2image sdlsound sdl2ttf openal openssl fluidsynth uchardet everything: deps-core ruby