summaryrefslogtreecommitdiffstats
path: root/src/fastscale/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-03-08 17:18:34 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-03-08 17:44:30 +0900
commite4505c9477f442cd834aa079295871ac9b498d7f (patch)
tree942507ccbb65082cfa19966eaba4121ccde44c09 /src/fastscale/CMakeLists.txt
parent0d811e3e031a8c5f8bbdd292e8795bf192ea2454 (diff)
downloadk3b-e4505c9477f442cd834aa079295871ac9b498d7f.tar.gz
k3b-e4505c9477f442cd834aa079295871ac9b498d7f.zip
Fix detection of MMX capabilities on ix86 archs
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 1a7322da1c4d67bd38c461498126a15dcb014ab0)
Diffstat (limited to 'src/fastscale/CMakeLists.txt')
-rw-r--r--src/fastscale/CMakeLists.txt19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/fastscale/CMakeLists.txt b/src/fastscale/CMakeLists.txt
index 66812fd..91bb8c7 100644
--- a/src/fastscale/CMakeLists.txt
+++ b/src/fastscale/CMakeLists.txt
@@ -21,15 +21,22 @@ link_directories(
${TQT_LIBRARY_DIRS}
)
-# Force to use C compiler for asm_scale.S instead of ASM
-# because contains mixed code - ASM with C definitions
-set_source_files_properties( asm_scale.S PROPERTIES LANGUAGE C )
-
-# TODO add assembler flags here (2016-01-14, Fat-Zer)
##### fastscale (static) ########################
+set( fastscale_SRCS scale.cpp )
+
+if( HAVE_X86_MMX )
+ list( APPEND fastscale_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( fastscale STATIC_PIC AUTOMOC
- SOURCES scale.cpp asm_scale.S
+ SOURCES ${fastscale_SRCS}
LINK tdecore-shared
)