Skip to content

Commit 70feb33

Browse files
author
Ayla Khan
committed
User-config file required for windows build.
1 parent cb573eb commit 70feb33

File tree

3 files changed

+122
-9
lines changed

3 files changed

+122
-9
lines changed

.gitignore

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
b2*
22
bjam*
33
bootstrap.log
4-
tools/build/v2/engine/bin.*
4+
boost/architecture
5+
boost/bin.v2
56
tools/build/v2/engine/bootstrap
7+
tools/build/src/engine/bootstrap
8+
tools/build/src/engine/bin*
69
project-config.jam*
10+
user-config.jam
711
CMakeCache.txt
812
CMakeFiles
913
cmake_install.cmake
1014
Makefile
1115
lib
12-
boost/architecture
13-
boost/bin.v2
14-
tools/build/src/engine/bootstrap
16+
x64
17+
*.vcxproj*
18+
Boost.sdf
19+
Boost.sln
20+
Boost.v12.suo

CMakeLists.txt

+20-5
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,26 @@ if(SCI_BOOST_LIBRARIES)
109109
endif()
110110

111111
if (BUILD_PYTHON)
112-
list(APPEND BOOTSTRAP_ARGS
113-
"--with-python=${SCI_PYTHON_EXE}"
114-
"--with-python-root=${SCI_PYTHON_ROOT}"
115-
"--with-python-version=${SCI_PYTHON_VERSION_SHORT}"
116-
)
112+
if(WIN32)
113+
# TO_NATIVE_PATH does not escape backslashes
114+
file(TO_NATIVE_PATH "${SCI_PYTHON_EXE}" TMP)
115+
string(REPLACE "\\" "\\\\" WIN32_PYTHON_EXE ${TMP})
116+
file(TO_NATIVE_PATH "${SCI_PYTHON_INCLUDE}" TMP)
117+
string(REPLACE "\\" "\\\\" WIN32_PYTHON_INCLUDE ${TMP})
118+
file(TO_NATIVE_PATH "${SCI_PYTHON_LIBRARY_DIR}" TMP)
119+
string(REPLACE "\\" "\\\\" WIN32_PYTHON_LIBRARY_DIR ${TMP})
120+
configure_file(user-config.jam.in user-config.jam @ONLY)
121+
list(APPEND BOOTSTRAP_ARGS
122+
"--user-config=user-config.jam"
123+
)
124+
else()
125+
# TODO: try user-config.jam instead...
126+
list(APPEND BOOTSTRAP_ARGS
127+
"--with-python=${SCI_PYTHON_EXE}"
128+
"--with-python-root=${SCI_PYTHON_ROOT}"
129+
"--with-python-version=${SCI_PYTHON_VERSION_SHORT}"
130+
)
131+
endif()
117132
endif()
118133

119134

user-config.jam.in

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Copyright 2003, 2005 Douglas Gregor
2+
# Copyright 2004 John Maddock
3+
# Copyright 2002, 2003, 2004, 2007 Vladimir Prus
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6+
7+
# This file is used to configure your Boost.Build installation. You can modify
8+
# this file in place, or you can place it in a permanent location so that it
9+
# does not get overwritten should you get a new version of Boost.Build. See:
10+
#
11+
# http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html
12+
#
13+
# for documentation about possible permanent locations.
14+
15+
# This file specifies which toolsets (C++ compilers), libraries, and other
16+
# tools are available. Often, you should be able to just uncomment existing
17+
# example lines and adjust them to taste. The complete list of supported tools,
18+
# and configuration instructions can be found at:
19+
#
20+
# http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html
21+
#
22+
23+
# This file uses Jam language syntax to describe available tools. Mostly,
24+
# there are 'using' lines, that contain the name of the used tools, and
25+
# parameters to pass to those tools -- where paremeters are separated by
26+
# semicolons. Important syntax notes:
27+
#
28+
# - Both ':' and ';' must be separated from other tokens by whitespace
29+
# - The '\' symbol is a quote character, so when specifying Windows paths you
30+
# should use '/' or '\\' instead.
31+
#
32+
# More details about the syntax can be found at:
33+
#
34+
# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language
35+
#
36+
37+
# ------------------
38+
# GCC configuration.
39+
# ------------------
40+
41+
# Configure gcc (default version).
42+
# using gcc ;
43+
44+
# Configure specific gcc version, giving alternative name to use.
45+
# using gcc : 3.2 : g++-3.2 ;
46+
47+
48+
# -------------------
49+
# MSVC configuration.
50+
# -------------------
51+
52+
# Configure msvc (default version, searched for in standard locations and PATH).
53+
# using msvc ;
54+
55+
# Configure specific msvc version (searched for in standard locations and PATH).
56+
# using msvc : 8.0 ;
57+
58+
59+
# ----------------------
60+
# Borland configuration.
61+
# ----------------------
62+
# using borland ;
63+
64+
65+
# ----------------------
66+
# STLPort configuration.
67+
# ----------------------
68+
69+
# Configure specifying location of STLPort headers. Libraries must be either
70+
# not needed or available to the compiler by default.
71+
# using stlport : : /usr/include/stlport ;
72+
73+
# Configure specifying location of both headers and libraries explicitly.
74+
# using stlport : : /usr/include/stlport /usr/lib ;
75+
76+
77+
# -----------------
78+
# QT configuration.
79+
# -----------------
80+
81+
# Configure assuming QTDIR gives the installation prefix.
82+
# using qt ;
83+
84+
# Configure with an explicit installation prefix.
85+
# using qt : /usr/opt/qt ;
86+
87+
# ---------------------
88+
# Python configuration.
89+
# ---------------------
90+
91+
# Configure specific Python version.
92+
using python : @SCI_PYTHON_VERSION_SHORT@ : @WIN32_PYTHON_EXE@ : @WIN32_PYTHON_INCLUDE@ : @WIN32_PYTHON_LIBRARY_DIR@ ;

0 commit comments

Comments
 (0)