cmake and asm?

Boudewijn Rempt boud at valdyas.org
Thu Jan 25 09:41:07 CET 2007


Including the config-processor.h file worked. For the record & for future 
improvement, here's what I've got now and what works for me:

* CMakeLists.txt

configure_file(config-processor.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-processor.h )

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o
                   COMMAND gcc -c -I. ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S 
                   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S )

set(kritaui_LIB_SRCS
    asm_scale.S
...
)

kde4_add_library(kritaui SHARED ${kritaui_LIB_SRCS} 
${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o )

* Contents of config-processor.h.cmake

/********** processor stuff *************/

/* Defined to 1 if the assembler supports MMX instructions. */
#cmakedefine HAVE_X86_MMX

/* Defined to 1 if the assembler supports SSE instructions. */
#cmakedefine HAVE_X86_SSE

/* Defined to 1 if the assembler supports SSE2 instructions. */
#cmakedefine HAVE_X86_SSE2

/* Defined to 1 if the assembler supports AltiVec instructions. */
#cmakedefine HAVE_PPC_ALTIVEC  

* Begin of the ams_scale.S

#include <config-processor.h>
#ifdef HAVE_X86_MMX




-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20070125/10c9dcd6/attachment.pgp 


More information about the Kde-buildsystem mailing list