@ECHO OFF

REM  Copyright (c) 2008-2014, Gilles Caulier, <caulier dot gilles at gmail dot com>
REM
REM  Redistribution and use is allowed according to the terms of the BSD license.
REM  For details see the accompanying COPYING-CMAKE-SCRIPTS file.

REM Adjust there the right path to KDE4 install directory.
SET KDE4_INSTALL_DIR=C:\KDE
SET TARGET_INSTALL_DIR=%KDE4_INSTALL_DIR%

SET PATH=%PATH%;%KDE4_INSTALL_DIR%\bin;%KDE4_INSTALL_DIR%\plugins
SET KDEDIRS=%KDE4_INSTALL_DIR%
SET KDE4_LIB_DIRS=%KDE4_INSTALL_DIR%
SET KDE4_LIB_DIR=%KDE4_INSTALL_DIR%
SET KDEROOT=%KDE4_INSTALL_DIR%
SET QTMAKESPEC=%KDE4_INSTALL_DIR%\mkspecs\win32-g++
SET QT_PLUGIN_PATH=%KDE4_INSTALL_DIR%\plugins
SET QTDIR=%KDE4_INSTALL_DIR%
SET QT_INSTALL_DIR=%KDE4_INSTALL_DIR%

IF NOT EXIST "build" md "build"

cd "build"

REM Microsoft Visual C++ command line compiler.
cmake -G "NMake Makefiles" . ^
      -DCMAKE_INSTALL_PREFIX=%KDE4_INSTALL_DIR% ^
      -BUILD_WITH_DEBUG_INFO=ON ^
      -DBUILD_EXAMPLES=OFF ^
      -DBUILD_TESTS=OFF ^
      -DBUILD_DOCS=OFF ^
      -DBUILD_PERF_TESTS=OFF ^
      -DBUILD_NEW_PYTHON_SUPPORT=OFF ^
      -DOPENCV_BUILD_3RDPARTY_LIBS=OFF ^
      -DINSTALL_C_EXAMPLES=OFF ^
      -DINSTALL_PYTHON_EXAMPLES=OFF ^
      -DWITH_1394=OFF ^
      -DWITH_CARBON=OFF ^
      -DWITH_CUDA=OFF ^
      -DWITH_EIGEN=OFF ^
      -DWITH_FFMPEG=OFF ^
      -DWITH_GSTREAMER=OFF ^
      -DWITH_GTK=OFF ^
      -DWITH_IPP=OFF ^
      -DWITH_JASPER=OFF ^
      -DWITH_JPEG=OFF ^
      -DWITH_OPENEXR=OFF ^
      -DWITH_OPENNI=OFF ^
      -DWITH_PNG=OFF ^
      -DWITH_PVAPI=OFF ^
      -DWITH_QT=OFF ^
      -DWITH_QUICKTIME=OFF ^
      -DWITH_QT_OPENGL=OFF ^
      -DWITH_TBB=OFF ^
      -DWITH_TIFF=OFF ^
      -DWITH_UNICAP=OFF ^
      -DWITH_V4L=OFF ^
      -DWITH_VIDEOINPUT=OFF ^
      -DWITH_XINE=OFF ^
      -DWITH_OPENCL=OFF ^
      -Wno-dev ^
      -DEXPAT_LIBRARY=%KDE4_INSTALL_DIR%/lib/expat.lib ^
      -DCMAKE_INCLUDE_PATH=%KDE4_INSTALL_DIR%/include ^
      -DCMAKE_LIBRARY_PATH=%KDE4_INSTALL_DIR%/lib ^
      ..
