summaryrefslogtreecommitdiffstats
path: root/kernel/CMakeLists.txt
blob: bd7d3b63a1110866daab07755e117d893d433a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/include
  ${CMAKE_BINARY_DIR}
  ${TDE_INCLUDE_DIR}
)


##### install files

install(
  DIRECTORY include/ksquirrel-libs/
  DESTINATION ${INCLUDE_INSTALL_DIR}/ksquirrel-libs/
)


##### main ksquirrel-lib
file( GLOB _lib_cpp_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/ksquirrel-libs/*.cpp )
tde_add_library( ksquirrel-libs SHARED AUTOMOC
  SOURCES ${_lib_cpp_files}
  VERSION 0.8.0
  DESTINATION ${LIB_INSTALL_DIR}
)


##### common codecs

function( conditional_build_codec _cond _codec )
  if( ${_cond} )
    file( GLOB _codec_cpp_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${_codec}/*.cpp )
    tde_add_library( ${_codec} SHARED AUTOMOC
      SOURCES ${_codec_cpp_files}
      LINK ksquirrel-libs-shared
      VERSION 0.8.0
      DESTINATION ${LIB_INSTALL_DIR}/ksquirrel-libs
    )
  endif( )
endfunction( )

conditional_build_codec( BUILD_AVS    kls_avs    )
conditional_build_codec( BUILD_BMP    kls_bmp    )
conditional_build_codec( BUILD_CUT    kls_cut    )
conditional_build_codec( BUILD_DDS    kls_dds    )
conditional_build_codec( BUILD_FLI    kls_fli    )
conditional_build_codec( BUILD_HDR    kls_hdr    )
conditional_build_codec( BUILD_ICO    kls_ico    )
conditional_build_codec( BUILD_KOALA  kls_koala  )
conditional_build_codec( BUILD_LIF    kls_lif    )
conditional_build_codec( BUILD_MDL    kls_mdl    )
conditional_build_codec( BUILD_MTV    kls_mtv    )
conditional_build_codec( BUILD_PCX    kls_pcx    )
conditional_build_codec( BUILD_PIX    kls_pix    )
conditional_build_codec( BUILD_PNM    kls_pnm    )
conditional_build_codec( BUILD_PSD    kls_psd    )
conditional_build_codec( BUILD_PSP    kls_psp    )
conditional_build_codec( BUILD_PXR    kls_pxr    )
conditional_build_codec( BUILD_RAS    kls_ras    )
conditional_build_codec( BUILD_RAWRGB kls_rawrgb )
conditional_build_codec( BUILD_SCT    kls_sct    )
conditional_build_codec( BUILD_SGI    kls_sgi    )
conditional_build_codec( BUILD_SUN    kls_sun    )
conditional_build_codec( BUILD_TGA    kls_tga    )
conditional_build_codec( BUILD_WAL    kls_xbm    )
conditional_build_codec( BUILD_WBMP   kls_wbmp   )
conditional_build_codec( BUILD_XBM    kls_wal    )
conditional_build_codec( BUILD_XCUR   kls_xcur   )


# other codecs

if( BUILD_DICOM OR BUILD_PNG OR BUILD_SVG )
  add_subdirectory( ksquirrel-libs-png )
endif( )

tde_conditional_add_subdirectory( BUILD_CAMERA    kls_camera   )
tde_conditional_add_subdirectory( BUILD_DICOM     kls_dicom    )
tde_conditional_add_subdirectory( BUILD_DJVU      kls_djvu     )
tde_conditional_add_subdirectory( BUILD_DXF       kls_dxf      )
tde_conditional_add_subdirectory( BUILD_EPS       kls_eps      )
tde_conditional_add_subdirectory( BUILD_FIG       kls_fig      )
tde_conditional_add_subdirectory( BUILD_GIF       kls_gif      )
tde_conditional_add_subdirectory( BUILD_IFF       kls_iff      )
tde_conditional_add_subdirectory( BUILD_JBIG      kls_jbig     )
tde_conditional_add_subdirectory( BUILD_JPEG2000  kls_jpeg2000 )
tde_conditional_add_subdirectory( BUILD_JPEG      kls_jpeg     )
tde_conditional_add_subdirectory( BUILD_LEAF      kls_leaf     )
tde_conditional_add_subdirectory( BUILD_LJPEG     kls_ljpeg    )
tde_conditional_add_subdirectory( BUILD_MAC       kls_mac      )
tde_conditional_add_subdirectory( BUILD_MNG       kls_mng      )
tde_conditional_add_subdirectory( BUILD_MSP       kls_msp      )
tde_conditional_add_subdirectory( BUILD_NEO       kls_neo      )
tde_conditional_add_subdirectory( BUILD_OPENEXR   kls_openexr  )
tde_conditional_add_subdirectory( BUILD_PI1       kls_pi1      )
tde_conditional_add_subdirectory( BUILD_PI3       kls_pi3      )
tde_conditional_add_subdirectory( BUILD_PICT      kls_pict     )
tde_conditional_add_subdirectory( BUILD_PNG       kls_png      )
tde_conditional_add_subdirectory( BUILD_SVG       kls_svg      )
tde_conditional_add_subdirectory( BUILD_TIFF      kls_tiff     )
tde_conditional_add_subdirectory( BUILD_TTF       kls_ttf      )
tde_conditional_add_subdirectory( BUILD_UTAH      kls_utah     )
tde_conditional_add_subdirectory( BUILD_WMF       kls_wmf      )
tde_conditional_add_subdirectory( BUILD_XCF       kls_xcf      )
tde_conditional_add_subdirectory( BUILD_XIM       kls_xim      )
tde_conditional_add_subdirectory( BUILD_XPM       kls_xpm      )
tde_conditional_add_subdirectory( BUILD_XWD       kls_xwd      )