Linux broke somehow. Restore it with system jpeg.

This commit is contained in:
Jason Felds
2015-06-19 20:53:13 -04:00
parent 7440f116b6
commit 42ad044817
4 changed files with 25 additions and 11 deletions
+7
View File
@@ -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)
get_target_property(current_property ${target} ${property})
if (current_property)
+5
View File
@@ -158,6 +158,11 @@ elseif(LINUX)
message(FATAL_ERROR "zlib support required.")
endif()
find_package("JPEG")
if(NOT(${JPEG_FOUND}))
message(FATAL_ERROR "jpeg support required.")
endif()
find_library(DL_LIBRARY dl)
if(${LIBDL_FOUND})
set(HAS_LIBDL TRUE)
+1 -3
View File
@@ -11,9 +11,7 @@ if (APPLE OR MSVC)
endif()
include(CMakeProject-png.cmake)
if (NOT MSVC)
include(CMakeProject-jpeg.cmake)
if (APPLE)
include(CMakeProject-jpeg.cmake)
include(CMakeProject-mad.cmake)
endif()
endif()
+5 -1
View File
@@ -493,6 +493,7 @@ elseif(APPLE)
)
else() # Unix / Linux
# TODO: Remember to find and locate the zip archive files.
sm_list_replace(SMDATA_LINK_LIB 8 "${JPEG_LIBRARY}")
if (HAS_FFMPEG)
if(WITH_SYSTEM_FFMPEG)
list(APPEND SMDATA_LINK_LIB
@@ -596,14 +597,17 @@ if(NOT APPLE)
list(APPEND SM_INCLUDE_DIRS
"${SM_EXTERN_DIR}/glew-1.5.8/include"
"${SM_EXTERN_DIR}/jsoncpp/include"
"${SM_EXTERN_DIR}/libjpeg"
"${SM_EXTERN_DIR}/zlib"
)
if(MSVC)
list(APPEND SM_INCLUDE_DIRS
"${SM_EXTERN_DIR}/ffmpeg/include"
"${SM_EXTERN_DIR}/libjpeg"
)
else()
list(APPEND SM_INCLUDE_DIRS
"${JPEG_INCLUDE_DIR}"
)
if (HAS_FFMPEG)
if (WITH_SYSTEM_FFMPEG)
list(APPEND SM_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIR}")