Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBS: added libjpeg dependency (not turbojpeg) #505

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.24)
# if(CMAKE_GENERATOR STREQUAL "Xcode")
# set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE STRING "")
# endif()
Expand Down
12 changes: 11 additions & 1 deletion contrib/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (NOT USE_LIBS_FORCE_LOCAL)
message(STATUS "Pkg-config not found")
endif()
if (NOT SDL2_FOUND)
find_package(SDL2)
find_package(SDL2 GLOBAL)
endif()
endif()
if (SDL2_FOUND OR EMSCRIPTEN)
Expand All @@ -58,3 +58,13 @@ target_precompile_headers(sdl2 INTERFACE ${SDL_PCH})

add_subdirectory(simplecpp)
add_subdirectory(yocto)

if (NOT USE_LIBS_FORCE_LOCAL)
find_package(JPEG GLOBAL)
endif()
if (NOT JPEG_FOUND)
add_subdirectory(jpeg)
add_library(JPEG::JPEG ALIAS jpeg)
set(JPEG_FOUND 1)
endif()
set(USE_LIBJPEG ${JPEG_FOUND} CACHE BOOL "Use libjpeg for jpeg saving" FORCE)
54 changes: 54 additions & 0 deletions contrib/libs/jpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
set(SRCS
jaricom.c
jcapimin.c
jcapistd.c
jcarith.c
jccoefct.c
jccolor.c
jcdctmgr.c
jchuff.c
jcinit.c
jcmainct.c
jcmarker.c
jcmaster.c
jcomapi.c
jcparam.c
jcprepct.c
jcsample.c
jctrans.c
jdapimin.c
jdapistd.c
jdarith.c
jdatadst.c
jdatasrc.c
jdcoefct.c
jdcolor.c
jddctmgr.c
jdhuff.c
jdinput.c
jdmainct.c
jdmarker.c
jdmaster.c
jdmerge.c
jdpostct.c
jdsample.c
jdtrans.c
jerror.c
jfdctflt.c
jfdctfst.c
jfdctint.c
jidctflt.c
jidctfst.c
jidctint.c
jmemmgr.c
jmemnobs.c
jquant1.c
jquant2.c
jutils.c
)
set(LIB jpeg)
engine_add_library(
LIB ${LIB}
SRCS ${SRCS}
)
target_include_directories(${LIB} PUBLIC .)
Loading
Loading