Linux broke somehow. Restore it with system jpeg.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
# Borrowed from http://stackoverflow.com/a/3323227/445373
|
||||||
|
function(sm_list_replace container index newvalue)
|
||||||
|
list(INSERT ${container} ${index} ${newvalue})
|
||||||
|
math(EXPR __INDEX "${index} + 1")
|
||||||
|
list(REMOVE_AT ${container} ${__INDEX})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(sm_append_simple_target_property target property str)
|
function(sm_append_simple_target_property target property str)
|
||||||
get_target_property(current_property ${target} ${property})
|
get_target_property(current_property ${target} ${property})
|
||||||
if (current_property)
|
if (current_property)
|
||||||
|
|||||||
@@ -158,6 +158,11 @@ elseif(LINUX)
|
|||||||
message(FATAL_ERROR "zlib support required.")
|
message(FATAL_ERROR "zlib support required.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package("JPEG")
|
||||||
|
if(NOT(${JPEG_FOUND}))
|
||||||
|
message(FATAL_ERROR "jpeg support required.")
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(DL_LIBRARY dl)
|
find_library(DL_LIBRARY dl)
|
||||||
if(${LIBDL_FOUND})
|
if(${LIBDL_FOUND})
|
||||||
set(HAS_LIBDL TRUE)
|
set(HAS_LIBDL TRUE)
|
||||||
|
|||||||
Vendored
+1
-3
@@ -11,9 +11,7 @@ if (APPLE OR MSVC)
|
|||||||
endif()
|
endif()
|
||||||
include(CMakeProject-png.cmake)
|
include(CMakeProject-png.cmake)
|
||||||
|
|
||||||
if (NOT MSVC)
|
|
||||||
include(CMakeProject-jpeg.cmake)
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
include(CMakeProject-jpeg.cmake)
|
||||||
include(CMakeProject-mad.cmake)
|
include(CMakeProject-mad.cmake)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|||||||
+5
-1
@@ -493,6 +493,7 @@ elseif(APPLE)
|
|||||||
)
|
)
|
||||||
else() # Unix / Linux
|
else() # Unix / Linux
|
||||||
# TODO: Remember to find and locate the zip archive files.
|
# TODO: Remember to find and locate the zip archive files.
|
||||||
|
sm_list_replace(SMDATA_LINK_LIB 8 "${JPEG_LIBRARY}")
|
||||||
if (HAS_FFMPEG)
|
if (HAS_FFMPEG)
|
||||||
if(WITH_SYSTEM_FFMPEG)
|
if(WITH_SYSTEM_FFMPEG)
|
||||||
list(APPEND SMDATA_LINK_LIB
|
list(APPEND SMDATA_LINK_LIB
|
||||||
@@ -596,14 +597,17 @@ if(NOT APPLE)
|
|||||||
list(APPEND SM_INCLUDE_DIRS
|
list(APPEND SM_INCLUDE_DIRS
|
||||||
"${SM_EXTERN_DIR}/glew-1.5.8/include"
|
"${SM_EXTERN_DIR}/glew-1.5.8/include"
|
||||||
"${SM_EXTERN_DIR}/jsoncpp/include"
|
"${SM_EXTERN_DIR}/jsoncpp/include"
|
||||||
"${SM_EXTERN_DIR}/libjpeg"
|
|
||||||
"${SM_EXTERN_DIR}/zlib"
|
"${SM_EXTERN_DIR}/zlib"
|
||||||
)
|
)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
list(APPEND SM_INCLUDE_DIRS
|
list(APPEND SM_INCLUDE_DIRS
|
||||||
"${SM_EXTERN_DIR}/ffmpeg/include"
|
"${SM_EXTERN_DIR}/ffmpeg/include"
|
||||||
|
"${SM_EXTERN_DIR}/libjpeg"
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
list(APPEND SM_INCLUDE_DIRS
|
||||||
|
"${JPEG_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
if (HAS_FFMPEG)
|
if (HAS_FFMPEG)
|
||||||
if (WITH_SYSTEM_FFMPEG)
|
if (WITH_SYSTEM_FFMPEG)
|
||||||
list(APPEND SM_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIR}")
|
list(APPEND SM_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIR}")
|
||||||
|
|||||||
Reference in New Issue
Block a user