summaryrefslogtreecommitdiffstats
path: root/kernel/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-05-27 18:38:14 +0900
committerMichele Calgaro <[email protected]>2023-09-21 20:02:00 +0900
commitf378f80d41bd9f85f5473d1af5920d00377faab3 (patch)
tree47c83ff3040f2f5ccc9ce8f9219f0859882aaf09 /kernel/CMakeLists.txt
parent2a7760d9b697a6845c3f0256edc0aaef3a202295 (diff)
downloadlibksquirrel-f378f80d41bd9f85f5473d1af5920d00377faab3.tar.gz
libksquirrel-f378f80d41bd9f85f5473d1af5920d00377faab3.zip
Conversion to cmake building system
Signed-off-by: Michele Calgaro <[email protected]> Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit af121719c99a99fc3444d181777a6177f0d59dba)
Diffstat (limited to 'kernel/CMakeLists.txt')
-rw-r--r--kernel/CMakeLists.txt106
1 files changed, 106 insertions, 0 deletions
diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt
new file mode 100644
index 0000000..bd7d3b6
--- /dev/null
+++ b/kernel/CMakeLists.txt
@@ -0,0 +1,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 )
+