mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-24 21:41:23 +00:00
Check for jpeg_mem_src()
This function only exists starting with libjpeg8. Check for existence and provide an implementation if necessary. This allows libjpeg6 to be used. Code borrowed from libjpeg8, adapt copyright in README accordingly.
This commit is contained in:
parent
27c5fd76ff
commit
22637272dc
1 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/sys/cmake")
|
|||
set(CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckFunctionExists)
|
||||
|
||||
option(CORE "Build the core" ON)
|
||||
option(GAME "Build the base game code" ON)
|
||||
|
@ -70,6 +71,13 @@ endif()
|
|||
find_package(JPEG REQUIRED)
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
|
||||
set(CMAKE_REQUIRED_INCLUDES ${JPEG_INCLUDE_DIR})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARY})
|
||||
CHECK_FUNCTION_EXISTS("jpeg_mem_src" jpeg_has_mem_src)
|
||||
if (jpeg_has_mem_src)
|
||||
add_definitions(-DHAVE_JPEG_MEM_SRC)
|
||||
endif ()
|
||||
|
||||
find_package(OGG REQUIRED)
|
||||
include_directories(${OGG_INCLUDE_DIR})
|
||||
|
||||
|
|
Loading…
Reference in a new issue