Skip to content

Commit

Permalink
fix: trying libjpeg arch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Dec 3, 2024
1 parent e934e85 commit b44991f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,14 @@ define NEW_APPLE_CMAKE_BUILD
# Setup cmake
$4/$(CMAKE_CACHE): DEP_SOURCE_DIR := $(DEPS_MODULES_DIR)/$3
$4/$(CMAKE_CACHE): DEP_BUILD_DIR := $4
$4/$(CMAKE_CACHE): CFLAGS := -Wall -arch arm64

# Conditionally set CFLAGS if $2 equals LIBJPEG_TURBO and BUILD_PLATFORM_ARCH equals arm64
ifeq ($2, LIBJPEG_TURBO)
ifeq ($(BUILD_PLATFORM_ARCH), arm64)
$4/$(CMAKE_CACHE): CFLAGS := -arch arm64
endif
endif

$4/$(CMAKE_CACHE): DEP_ARTIFACTS_DIR := $$($1_DEPS_ARTIFACTS_DIR)
$4/$(CMAKE_CACHE): CMAKE_BUILD_SETTINGS := -GXcode -DCMAKE_MACOSX_BUNDLE=NO
$4/$(CMAKE_CACHE): PLATFORM := -DPLATFORM=$$($1_ARCH)
Expand All @@ -574,7 +581,7 @@ $4/$(CMAKE_CACHE):
$$(SETUP_CMAKE)

# Build
$(call CLEAN_LIBGJPEG)
# $(call CLEAN_LIBGJPEG)
$$($1_DEPS_LIB_DIR)/$5: CMAKE_BUILD_DIR := $4
$$($1_DEPS_LIB_DIR)/$5: CMAKE_BUILD_OPTIONS := $(if $(filter $($1_SUBSYSTEM),$(APPLE_IOS)),CODE_SIGNING_ALLOWED=NO,)
$$($1_DEPS_LIB_DIR)/$5: $4/$(CMAKE_CACHE)
Expand Down

0 comments on commit b44991f

Please sign in to comment.