Commit 821a4f54 authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: cmake not work nicely on *nix. offically unspported by jpeg-turbo

parent 341325d7
......@@ -2,6 +2,27 @@ INCLUDE_ONCE_MACRO(JPEG)
SETUP_SUPERBUILD(JPEG)
if(WIN32)
set(JPEG_CONFIGURE_COMMAND "${SB_CMAKE_COMMAND}"
${SB_CMAKE_CACHE_ARGS}
-DENABLE_SHARED=TRUE
-DENABLE_STATIC=FALSE
-DWITH_SIMD=FALSE
-DWITH_TURBOJPEG=FALSE
-DWITH_ARITH_DEC=TRUE
-DWITH_JAVA=FALSE
${JPEG_SB_SRC} )
else()
set(JPEG_CONFIGURE_COMMAND "${SB_ENV_CONFIGURE_CMD};${JPEG_SB_SRC}/configure"
${SB_CONFIGURE_ARGS}
--with-arith-dec
--without-simd
--without-java
)
endif()
ExternalProject_Add(JPEG
PREFIX JPEG
URL "http://sourceforge.net/projects/libjpeg-turbo/files/1.4.1/libjpeg-turbo-1.4.1.tar.gz"
......@@ -10,15 +31,7 @@ ExternalProject_Add(JPEG
BINARY_DIR ${JPEG_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
-DENABLE_SHARED=TRUE
-DENABLE_STATIC=FALSE
-DWITH_SIMD=FALSE
-DWITH_TURBOJPEG=FALSE
-DWITH_ARITH_DEC=TRUE
-DWITH_JAVA=FALSE
${JPEG_SB_SRC}
CONFIGURE_COMMAND ${JPEG_CONFIGURE_COMMAND}
)
SUPERBUILD_PATCH_SOURCE(JPEG)
......
diff -burN libjpeg-turbo-1.4.1.orig/CMakeLists.txt libjpeg-turbo-1.4.1/CMakeLists.txt
--- libjpeg-turbo-1.4.1.orig/CMakeLists.txt 2016-05-19 08:20:33.000000000 +0200
+++ libjpeg-turbo-1.4.1/CMakeLists.txt 2016-05-19 09:24:28.000000000 +0200
@@ -167,6 +167,11 @@
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
+
+include(CheckTypeSize)
+check_type_size("size_t" JPEG_SIZEOF_SIZE_T)
+set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -DSIZEOF_SIZE_T=${JPEG_SIZEOF_SIZE_T})
+
configure_file(win/jconfig.h.in jconfig.h)
configure_file(win/jconfigint.h.in jconfigint.h)
@@ -287,9 +292,9 @@
endif()
if(WITH_12BIT)
- set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED -DUSE_SETMODE")
+ set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED")
else()
- set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
+ set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif()
diff -burN libjpeg-turbo-1.4.1.orig/win/jconfig.h.in libjpeg-turbo-1.4.1/win/jconfig.h.in
--- libjpeg-turbo-1.4.1.orig/win/jconfig.h.in 2016-05-19 08:20:33.000000000 +0200
+++ libjpeg-turbo-1.4.1/win/jconfig.h.in 2016-05-19 09:26:12.000000000 +0200
@@ -48,3 +48,5 @@
#undef RIGHT_SHIFT_IS_UNSIGNED
#endif /* JPEG_INTERNALS */
+
+#undef USE_SETMODE
diff -burN libjpeg-turbo-1.4.1.orig/CMakeLists.txt libjpeg-turbo-1.4.1/CMakeLists.txt
--- libjpeg-turbo-1.4.1.orig/CMakeLists.txt 2016-05-19 08:20:33.000000000 +0200
+++ libjpeg-turbo-1.4.1/CMakeLists.txt 2016-05-19 09:24:28.000000000 +0200
@@ -167,6 +167,11 @@
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
+
+include(CheckTypeSize)
+check_type_size("size_t" JPEG_SIZEOF_SIZE_T)
+set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -DSIZEOF_SIZE_T=${JPEG_SIZEOF_SIZE_T})
+
configure_file(win/jconfig.h.in jconfig.h)
configure_file(win/jconfigint.h.in jconfigint.h)
@@ -287,9 +292,9 @@
endif()
if(WITH_12BIT)
- set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED -DUSE_SETMODE")
+ set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED")
else()
- set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED -DUSE_SETMODE")
+ set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif()
diff -burN libjpeg-turbo-1.4.1.orig/win/jconfig.h.in libjpeg-turbo-1.4.1/win/jconfig.h.in
--- libjpeg-turbo-1.4.1.orig/win/jconfig.h.in 2016-05-19 08:20:33.000000000 +0200
+++ libjpeg-turbo-1.4.1/win/jconfig.h.in 2016-05-19 09:26:12.000000000 +0200
@@ -48,3 +48,5 @@
#undef RIGHT_SHIFT_IS_UNSIGNED
#endif /* JPEG_INTERNALS */
+
+#undef USE_SETMODE
diff -burN libjpeg-turbo-1.4.1.orig/CMakeLists.txt libjpeg-turbo-1.4.1/CMakeLists.txt
--- libjpeg-turbo-1.4.1.orig/CMakeLists.txt 2016-09-06 09:37:12.107984277 +0200
+++ libjpeg-turbo-1.4.1/CMakeLists.txt 2016-09-06 09:47:16.479979552 +0200
@@ -167,8 +167,14 @@
message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
-configure_file(win/jconfig.h.in jconfig.h)
-configure_file(win/jconfigint.h.in jconfigint.h)
+if(WIN32)
+ set(BUILD "04/02/2016")
+ configure_file(win/jconfig.h.in jconfig.h)
+ configure_file(win/jconfigint.h.in jconfigint.h)
+else()
+ configure_file(jconfig.h.in jconfig.h)
+ configure_file(jconfigint.h.in jconfigint.h)
+endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment