Skip to content
pablospe edited this page May 31, 2011 · 13 revisions

Why?

  • Cross-platform build system.
  • Out-of-source_build_trees
  • CPack - make package
    • CPack_Package_Generators
      • TGZ, STGZ, TBZ2, TZ, ZIP
      • NSIS (Windows only)
      • RPM, DEV (Unix only)
      • DragNDrop, PackageMaker, OSXX11, Bundle (OSX only)
  • Generators
    • Borland Makefiles
    • MSYS Makefiles
    • MinGW Makefiles
    • NMake Makefiles
    • Unix Makefiles
    • Visual Studio 6, 7, 8, 9, 10
    • Watcom WMake
    • CodeBlocks - MinGW and Unix Makefiles
    • Eclipse CDT4 - MinGW, NMake and Unix Makefiles

Download the cmake branch

git clone -b cmake git://github.com/pablospe/LipiTk.git

How to compile LipiTk with cmake?

> cd LipiTk
> mkdir build_release
> cd build_release
> cmake -D CMAKE_INSTALL_PREFIX=install/ ..
> make
> make install

Observations:

  • CMAKE_INSTALL_PREFIX=install/ is optional. With this setting the installation directory would be LipiTk/build_release/install
  • There is no longer need to use LIPI_ROOT environment variable!
  • The installation is incomplete, "make install" does not copy the "projects/" directory. It must be copy by hand.

Debug

> mkdir build_debug
> cd build_debug
> cmake -DCMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=install/ ..
> make

Using LikiTk (blackboard example)

> git clone git://github.com/pablospe/blackboard.git
> cd blackboard
> mkdir build_debug
> cd build_debug
> cmake  ..
> make
> ./blackboard NUMERALS_NUM

Observation:

  • If you have specified 'CMAKE_INSTALL_PREFIX' for LipiTk (using a non-default location), probably the line will not work:

    find_package( LipiTk REQUIRED ) 
    

so, it is possible to help CMake with the use of HINTS

    find_package( LipiTk REQUIRED 
                  HINTS  LIPITk_DIR/build_release/install )
  • It depends on OpenCV

Troubleshooting

  1. Problem:

     Error loading Model data.
    

Solution (temporal): Comment the following line:

    1685:     // LTKReturnError(errorCode);

Info about CMake

How to package for use by others?

Faq

Installation tree

(after make install)

    > tree install/
    LipiTk/build_release/install
    ├── bin
    │   ├── featurefilewriter
    │   ├── imgwriter
    │   ├── mdv
    │   ├── runshaperec
    │   ├── runwordrec
    │   ├── shaperectst
    │   └── wordrectst
    ├── include
    │   ├── lipiengine
    │   │   ├── lipiengine.h
    │   │   ├── LipiEngineModule.h
    │   │   └── version.h
    │   ├── logger
    │   │   └── logger.h
    │   ├── LTKCaptureDevice.h
    │   ├── LTKChannel.h
    │   ├── LTKClassifierDefaults.h
    │   ├── LTKConfig.h
    │   ├── LTKErrorsList.h
    │   ├── LTKException.h
    │   ├── LTKInc.h
    │   ├── LTKLipiEngineInterface.h
    │   ├── LTKLogger.h
    │   ├── LTKLoggerInterface.h
    │   ├── LTKMacros.h
    │   ├── LTKOSUtilFactory.h
    │   ├── LTKOSUtil.h
    │   ├── LTKPreprocDefaults.h
    │   ├── LTKPreprocessor.h
    │   ├── LTKPreprocessorInterface.h
    │   ├── LTKRecognitionContext.h
    │   ├── LTKRefCountedPtr.h
    │   ├── LTKScreenContext.h
    │   ├── LTKShapeFeatureMacros.h
    │   ├── LTKShapeRecoConfig.h
    │   ├── LTKShapeRecoEngine.h
    │   ├── LTKShapeRecognizer.h
    │   ├── LTKShapeRecoResult.h
    │   ├── LTKShapeRecoUtil.h
    │   ├── LTKTraceFormat.h
    │   ├── LTKTraceGroup.h
    │   ├── LTKTrace.h
    │   ├── LTKTypes.h
    │   ├── LTKWordRecoConfig.h
    │   ├── LTKWordRecognizer.h
    │   ├── LTKWordRecoResult.h
    │   ├── shaperec
    │   │   ├── ActiveDTWAdapt.h
    │   │   ├── ActiveDTWClusterModel.h
    │   │   ├── ActiveDTW.h
    │   │   ├── ActiveDTWShapeModel.h
    │   │   ├── ActiveDTWShapeRecognizer.h
    │   │   ├── featureextractor
    │   │   │   ├── l7.h
    │   │   │   ├── L7ShapeFeatureExtractor.h
    │   │   │   ├── L7ShapeFeature.h
    │   │   │   ├── LTKShapeFeatureExtractorFactory.h
    │   │   │   ├── LTKShapeFeatureExtractor.h
    │   │   │   ├── LTKShapeFeature.h
    │   │   │   ├── NPen.h
    │   │   │   ├── NPenShapeFeatureExtractor.h
    │   │   │   ├── NPenShapeFeature.h
    │   │   │   ├── PointFloat.h
    │   │   │   ├── PointFloatShapeFeatureExtractor.h
    │   │   │   ├── PointFloatShapeFeature.h
    │   │   │   ├── SubStroke.h
    │   │   │   ├── SubStrokeShapeFeatureExtractor.h
    │   │   │   └── SubStrokeShapeFeature.h
    │   │   ├── LTKShapeSample.h
    │   │   ├── NeuralNet.h
    │   │   ├── NeuralNetShapeRecognizer.h
    │   │   ├── NNAdapt.h
    │   │   ├── NN.h
    │   │   ├── NNShapeRecognizer.h
    │   │   └── preprocessing.h
    │   ├── TpcError.h
    │   ├── util
    │   │   ├── LTKCheckSumGenerate.h
    │   │   ├── LTKConfigFileReader.h
    │   │   ├── LTKDynamicTimeWarping.h
    │   │   ├── LTKErrors.h
    │   │   ├── LTKHierarchicalClustering.h
    │   │   ├── LTKImageWriter.h
    │   │   ├── LTKInkFileReader.h
    │   │   ├── LTKInkFileWriter.h
    │   │   ├── LTKInkUtils.h
    │   │   ├── LTKLinuxUtil.h
    │   │   ├── LTKLoggerUtil.h
    │   │   ├── LTKStrEncoding.h
    │   │   ├── LTKStringUtil.h
    │   │   ├── LTKVersionCompatibilityCheck.h
    │   │   ├── LTKWinCEUtil.h
    │   │   └── LTKWindowsUtil.h
    │   └── wordrec
    │       ├── BoxFieldRecognizer.h
    │       └── boxfld.h
    ├── lib
    │   ├── libactivedtw.so
    │   ├── libboxfld.so
    │   ├── libl7.so
    │   ├── liblipiengine.so
    │   ├── liblogger.so
    │   ├── libneuralnet.so
    │   ├── libnn.so
    │   ├── libnpen.so
    │   ├── libpointfloat.so
    │   ├── libpreproc.so
    │   ├── libsubstroke.so
    │   ├── libutil.so
    │   └── static
    │       ├── libcommon.a
    │       ├── libfeatureextractorcommon.a
    │       ├── libshaperecommon.a
    │       └── libwordreccommon.a
    ├── LipiTkConfig.cmake
    ├── LipiTkLibraryDepends.cmake
    └── LipiTkLibraryDepends-debug.cmake