link_boost.xcpjh
//////////////////// Boost //////////////////////
/*
Building boost under Windows
----------------------------
- Download boost_1_61_0.7z
- Unzip to $/ThirdParty.Ceda/boost/boost_1_61_0
- Copy $/Ceda/_BUILD/Init/ceda_build_boost.bat to $/ThirdParty.Ceda/boost/boost_1_61_0
- Open the command prompt and change current directory to
$/ThirdParty.Ceda/boost/boost_1_61_0
- Run the following command:
ceda_build_boost.bat 12 4 1
(12 for VS2013
4 to build with 4 cores
1 to support Windows XP)
- Rename the 'lib' folder under lib32 and lib64 to 'vc12'
$(PATH_TO_ROOT)/ThirdParty.Ceda/boost/boost_1_61_0/lib32/vc12
$(PATH_TO_ROOT)/ThirdParty.Ceda/boost/boost_1_61_0/lib64/vc12
- Delete the following folders (this frees up about 8GB of disk space):
$/ThirdParty.Ceda/boost/boost_1_61_0/build32
$/ThirdParty.Ceda/boost/boost_1_61_0/build64
*/
@if (IsWindowsPlatform || IsiOSBasedPlatform)
{
$BOOST_VER = "1_61_0"
}
@if (IsWindowsPlatform)
{
$BOOST_ROOT = "$(PATH_TO_ROOT)/ThirdParty.Ceda/boost/boost_$(BOOST_VER)"
$BOOST_INCLUDE = "$(BOOST_ROOT)"
$BOOST_LIB32 = "$(BOOST_ROOT)/lib32/$(COMPILER)"
$BOOST_LIB64 = "$(BOOST_ROOT)/lib64/$(COMPILER)"
}
@elseif (IsLinuxPlatform)
{
$BOOST_INCLUDE = "/usr/include"
$BOOST_LIB = "/usr/lib/x86_64-linux-gnu"
}
@elseif (IsMacOSXPlatform)
{
$BOOST_INCLUDE = "/usr/local/include"
$BOOST_LIB = "/usr/local/lib"
}
@elseif (IsiOSBasedPlatform)
{
$BOOST_FRAMEWORK = "$(PATH_TO_ROOT)/ThirdParty.Ceda/boost/$(BOOST_VER)/framework"
}
@else @assert(false)
@if (IsGccBasedCompiler)
{
+cpp
{
-DCEDA_USING_BOOST
@if (IsLinuxPlatform || IsMacOSXPlatform)
{
// There is no need to use -Idir because /usr/local/include is in the list of default
// include paths.
/* -I"$(BOOST_INCLUDE)" */
}
@if (IsiOSBasedPlatform)
{
-F"$(BOOST_FRAMEWORK)"
}
}
+link("Dynamic-Link Library", "Application", "Console Application")
{
@if (IsLinuxPlatform || IsMacOSXPlatform)
{
// There is no need to use -Lsearchdir because /usr/local/lib is in the list of default
// library search paths.
/* -L"$(BOOST_LIB)" */
-lboost_atomic
-lboost_chrono
-lboost_system
-lboost_thread
-lboost_filesystem
-lboost_locale
}
@if (IsiOSBasedPlatform)
{
-F"$(BOOST_FRAMEWORK)"
-framework boost
}
}
/*
@if (IsLinuxPlatform)
{
+link("Application", "Console Application")
{
-Wl,-rpath="$(BOOST_LIB)"
}
}
*/
}
@if (IsWindowsPlatform)
{
+cpp
{
/D "CEDA_USING_BOOST"
/I "$(BOOST_INCLUDE)"
}
+link("Win32")
{
/LIBPATH:"$(BOOST_LIB32)"
}
+link("x64")
{
/LIBPATH:"$(BOOST_LIB64)"
}
}