link_KyotoCabinet.xcpjh


//////////////////// Kyoto Cabinet //////////////////////
/*
Instructions for Windows

Kyoto must be built from source using VS2015 
(there seems to be a check on the compiler version, which fails when using the pre-generated binaries in kcwin32.zip)

1)  Download "Source Packages of the core library (C/C++)" from http://fallabs.com/kyotocabinet/
    --> kyotocabinet-1.2.76.tar.gz (size of file is 930kB)

2)  Unzip to C:\developer\_root_\ThirdParty.Ceda\kyotocabinet-1.2.76

3)  Edit C:\developer\_root_\ThirdParty.Ceda\kyotocabinet-1.2.76\VCmakefile
    to allow building x64 version under VS2015 and using dynamic CRT libs (/MD instead of /MT compiler switch):

        VCPATH = C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
        SDKPATH = C:\Program Files (x86)\Windows Kits\8.1
        WINKITS_10 = C:\Program Files (x86)\Windows Kits\10
        WINKITS_VER = 10.0.10240.0

        CLFLAGS = /nologo \
          /I "$(VCPATH)\Include" /I "$(VCPATH)\PlatformSDK\Include" /I "$(SDKPATH)\Include" \
          /I "." \
          /DNDEBUG /D_CRT_SECURE_NO_WARNINGS \
          /O2 /EHsc /W3 /wd4244 /wd4351 /wd4800 /MD

        LIBFLAGS = /nologo \
          /libpath:"$(VCPATH)\lib\amd64" /libpath:"$(WINKITS_10)\Lib\$(WINKITS_VER)\ucrt\x64" /libpath:"$(SDKPATH)\Lib\winv6.3\um\x64" \
          /libpath:"."
        LINKFLAGS = /nologo \
          /libpath:"$(VCPATH)\lib\amd64" /libpath:"$(WINKITS_10)\Lib\$(WINKITS_VER)\ucrt\x64" /libpath:"$(SDKPATH)\Lib\winv6.3\um\x64" \
          /libpath:"."

4)  Run a cmd prompt and run these commands:

        cd C:\developer\_root_\ThirdParty.Ceda\kyotocabinet-1.2.76
        C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64
        nmake -f VCmakefile

5)  Download "Binary Packages for Windows (C/C++/Java)" from  http://fallabs.com/kyotocabinet/
    ---> kcwin32.zip (size of file is 6437 kB)

6)  Unzip to C:\developer\_root_\ThirdParty.Ceda\kcwin32

7)  Copy C:\developer\_root_\ThirdParty.Ceda\kyotocabinet-1.2.76\kyotocabinet.lib into the directory
         C:\developer\_root_\ThirdParty.Ceda\kcwin32\lib
*/

/*
C:\developer\_root_\ThirdParty.Ceda\kcwin32
    include
        kcdb.h
    lib
        kyotocabinet.lib    
*/

@if (IsWindowsPlatform)
{    
    $KYOTO_CABINET = "C:/developer/_root_/ThirdParty.Ceda/kcwin32"

    +cpp
    {
        /I "$(KYOTO_CABINET)/include"
        /D "CEDA_USING_KYOTO_CABINET"
    }
    +link
    {
        /LIBPATH:"$(KYOTO_CABINET)/lib"
        "kyotocabinet.lib"
    }
}