not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / ksplash / ksplashx / CMakeLists.txt
blob353494f940ffbca3ea2f16a05341d00d69f2bcd8
1 project( ksplashx )
3 add_subdirectory( scale )
4 add_subdirectory( utils )
5 add_subdirectory( themes )
7 include( FindPNG )
9 include_directories(${PNG_PNG_INCLUDE_DIR})
11 include (CheckCXXSourceCompiles)
12 CHECK_CXX_SOURCE_COMPILES(" int main() { __asm__(\"pxor %mm0, %mm0\") ; }" X86_MMX_FOUND)
14 ########### next target ###############
16 set( ksplashx_SRCS
17     main.cpp
18     qglobal.cpp
19     qpngio.cpp
20     qimage.cpp
21     qsize.cpp
22     pixmap.cpp
23     qcolor.cpp
24     qcolor_x11.cpp
25     qcolor_p.cpp
26     x11_defs.cpp
27     defs.cpp
28     splash.cpp
29     qrect.cpp
30     kcpuinfo.cpp
31     scale.cpp )
33 if( X86_MMX_FOUND2 )
34     set( ksplashx_SRCS ${ksplashx_SRCS}
35         asm_scale.S )
36     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o
37         COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S 
38         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/asm_scale.S )
39     set( ksplashx_EXTRA_SRCS ${CMAKE_CURRENT_BINARY_DIR}/asm_scale.o )
40     ADD_DEFINITIONS( -DHAVE_X86_MMX )
41 endif( X86_MMX_FOUND2 )
43 add_executable( ksplashx ${ksplashx_SRCS} ${ksplashx_EXTRA_SRCS} )
44 target_link_libraries( ksplashx ${X11_LIBRARIES} ${PNG_LIBRARIES})
45 if( X11_Xinerama_FOUND )
46     target_link_libraries( ksplashx ${X11_Xinerama_LIB} )
47 endif( X11_Xinerama_FOUND )
48 install( TARGETS ksplashx ${INSTALL_TARGETS_DEFAULT_ARGS} )