summaryrefslogtreecommitdiffstats
path: root/src/imageutils
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-03-05 19:43:11 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-03-08 10:39:04 +0900
commitbc9bda10c93ebfb9862270576b445d1c2798d66d (patch)
treeb55e4d3b49d75130f681bcb2f680858d5395f1b2 /src/imageutils
parenta8bf4dbf8aa3c20f60454a296278f8d00c83617a (diff)
downloadgwenview-bc9bda10c93ebfb9862270576b445d1c2798d66d.tar.gz
gwenview-bc9bda10c93ebfb9862270576b445d1c2798d66d.zip
Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/imageutils')
-rw-r--r--src/imageutils/CMakeLists.txt34
-rw-r--r--src/imageutils/jpegcontent.cpp2
2 files changed, 34 insertions, 2 deletions
diff --git a/src/imageutils/CMakeLists.txt b/src/imageutils/CMakeLists.txt
new file mode 100644
index 0000000..9681a4a
--- /dev/null
+++ b/src/imageutils/CMakeLists.txt
@@ -0,0 +1,34 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${EXIV2_INCLUDE_DIRS}
+ ${JPEG_INCLUDE_DIR}
+)
+
+
+##### gvimageutils (static)
+
+set( gvimageutils_SRCS imageutils.cpp jpegcontent.cpp scale.cpp transupp.c croppedqimage.cpp )
+
+if( HAVE_X86_MMX )
+ list( gvimageutils_SRCS APPEND _SRCS asm_scale.S )
+
+ # Force to use C compiler for asm_scale.S instead of ASM
+ # because it contains mixed code - ASM with C definitions
+ set_source_files_properties( asm_scale.S PROPERTIES LANGUAGE C )
+
+ add_compile_options( -DHAVE_X86_MMX )
+endif( )
+
+tde_add_library( gvimageutils STATIC_PIC AUTOMOC
+ SOURCES ${gvimageutils_SRCS}
+ LINK tdecore-shared tdeio-shared ${EXIV2_LIBRARIES} ${JPEG_LIBRARIES}
+)
+
+
+##### testjpegcontent (executable)
+
+tde_add_check_executable( testjpegcontent AUTOMOC
+ SOURCES testjpegcontent.cpp
+ LINK gvimageutils-static
+)
diff --git a/src/imageutils/jpegcontent.cpp b/src/imageutils/jpegcontent.cpp
index d94a32e..55bc384 100644
--- a/src/imageutils/jpegcontent.cpp
+++ b/src/imageutils/jpegcontent.cpp
@@ -17,9 +17,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#if defined(HAVE_CONFIG_H)
#include "config.h"
-#endif
// System
#include <math.h>