@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_BUILD_TYPE=relwithdebinfo ^
      -DCMAKE_INSTALL_PREFIX=%KDE4_INSTALL_DIR% ^
      -DKDE4_BUILD_TESTS=ON ^
      -DDIGIKAMSC_CHECKOUT_PO=OFF ^
      -DDIGIKAMSC_COMPILE_PO=OFF ^
      -DDIGIKAMSC_COMPILE_DOC=ON ^
      -DDIGIKAMSC_COMPILE_LIBKIPI=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKEXIV2=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKDCRAW=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKSANE=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKFACE=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKGEOMAP=OFF ^
      -DDIGIKAMSC_COMPILE_LIBMEDIAWIKI=OFF ^
      -DDIGIKAMSC_COMPILE_LIBKVKONTAKTE=OFF ^
      -DENABLE_OPENCV3=OFF ^
      -DENABLE_LCMS2=OFF ^
      -DENABLE_MYSQLSUPPORT=OFF ^
      -DENABLE_INTERNALMYSQL=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 ^
      ..
