cinder のアプリケーションを bjam を使用してビルドする

※ cinder 本体のビルドではありません。
そんな訳で、cinder を使用したアプリケーションのビルド設定を bjam を使ってガリガリ書きました。

★環境

  • WindowsXP
  • msvc 2010
  • WindowsSDK 7.1
  • cinder 0.8.2

★jamroot.jam/project-config.jam

[jamroot.jam]

import notfile ;

CINDER_ROOT = D:/home/work/software/lib/cpp/cinder/cinder_0.8.2_vc2010 ;

project sample
    : requirements
        <include>$(CINDER_ROOT)/include
        <include>$(CINDER_ROOT)/boost
        <library-path>$(CINDER_ROOT)/lib 
        <library-path>$(CINDER_ROOT)/lib/msw
        <library-path>"C:/Program Files/Microsoft SDKs/Windows/v7.1/Lib"
        <define>WIN32
        <define>_WINDOWS
        <define>_UNICODE
        <define>UNICODE
        <cxxflags>/MT
#        <linkflags>/NODEFAULTLIB:"LIBCMT"
        <linkflags>/SUBSYSTEM:WINDOWS
;

lib cinder_lib : : <variant>debug <name>cinder ;
lib cinder_lib : : <variant>release <name>cinder ;

lib kernel32 : : <name>kernel32 ;
lib user32   : : <name>User32 ;
lib gdi32    : : <name>gdi32 ;
lib winspool : : <name>winspool ;
lib comdlg32 : : <name>comdlg32 ;
lib advapi32 : : <name>advapi32 ;
lib shell32  : : <name>shell32 ;
lib ole32    : : <name>ole32 ;
lib oleaut32 : : <name>oleaut32 ;
lib uuid     : : <name>uuid ;
lib odbc32   : : <name>odbc32 ;
lib odbccp32 : : <name>odbccp32 ;

exe sample :
#    source
    main.cpp

#    cinder
    cinder_lib

#    WindowsSDK
    kernel32  gdi32    winspool  comdlg32
    advapi32  shell32  ole32     oleaut32
    uuid      odbc32   odbccp32  user32
;

actions exec_action
{
    $(2)
}
notfile exec : @exec_action : /sample//sample ;
explicit exec ;

[project-config.jam]

using msvc : : : ;


ビルドオプションやライブラリの設定なんかはは、msvc の設定をそのまま引っ張てきて使っている感じです。
lib の設定方法が頭悪いのでもうちょっと何とかしたいですね。
一応、debug/release の両方でビルド/実行出来ると思います。
まぁぶっちゃけ、msvc のソリューション作ったほうが早いですね!!
bjam 爆発しろ!!