Skip to content

Commit 8905f77

Browse files
committed
Windows build options : HQ 5.0 / Windows 6.0 compatibility
- Dependencies now use simplified Boost packaging in https://github.com/hypothetical-inc/gafferDependencies/releases/tag/5.0.0, making the file and directory names less verbose. - Move `CXXFLAGS` into `SConstruct`. It's not possible to set a list value from a batch script, which is what the dependencies project uses to build Cortex. Also these flags are required, so this move makes them less prone to being left out. - USD 21.11 prefixes libraries with `usd_`
1 parent bbd1c8b commit 8905f77

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/main/options.windows

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ INSTALL_RMANDISPLAY_NAME = build + "\\renderMan\\displayDrivers\\ieDisplay"
1313
INSTALL_PYTHON_DIR = build + "\\python"
1414
INSTALL_IECORE_OPS = ""
1515

16-
# disable permissive mode, making MSVC more standards compliant
17-
# /D_USE_MATH_DEFINES is needed with permissive mode off for
18-
# common definitions like M_P
19-
# /Zc:externC- fixes a compilation error with Boost::interprocess
20-
# described here:
21-
# https://developercommunity.visualstudio.com/content/problem/756694/including-windowsh-and-boostinterprocess-headers-l.html
22-
CXXFLAGS = ["/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-"]
23-
2416
LIBPATH = libs
2517

2618
PYTHON = deps + "\\bin\\python"
@@ -33,8 +25,9 @@ PYTHONPATH = deps + "\\python"
3325
# Libs
3426
# ====
3527

36-
BOOST_INCLUDE_PATH = includes + "\\boost-1_68"
37-
BOOST_LIB_SUFFIX = "-vc141-mt-x64-1_68"
28+
BOOST_INCLUDE_PATH = includes
29+
BOOST_LIB_SUFFIX = ""
30+
BOOST_LIB_PATH = libs
3831

3932
OPENEXR_INCLUDE_PATH = includes
4033
OIIO_INCLUDE_PATH = includes + "\\OpenImageIO"
@@ -53,6 +46,7 @@ GLEW_LIB_SUFFIX = "32"
5346
TBB_INCLUDE_PATH = includes
5447
USD_INCLUDE_PATH = includes
5548
USD_LIB_PATH = libs
49+
USD_LIB_PREFIX = "usd_"
5650
DOXYGEN = deps + "\\doxygen\\doxygen.exe"
5751

5852
# Renderers

SConstruct

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,18 @@ o.Add(
8585

8686
)
8787

88+
# Windows : Disable permissive mode, making MSVC more standards compliant.
89+
# /D_USE_MATH_DEFINES is needed with permissive mode off for
90+
# common definitions like M_P.
91+
# /Zc:externC- fixes a compilation error with Boost::interprocess
92+
# described here:
93+
# https://developercommunity.visualstudio.com/content/problem/756694/including-windowsh-and-boostinterprocess-headers-l.html
94+
# /DBOOST_ALL_NO_LIB is needed to find Boost when it is built without
95+
# verbose system information added to file and directory names.
8896
o.Add(
8997
"CXXFLAGS",
9098
"The extra flags to pass to the C++ compiler during compilation.",
91-
[ "-pipe", "-Wall", "-Wextra" ] if Environment()["PLATFORM"] != "win32" else [],
99+
[ "-pipe", "-Wall", "-Wextra" ] if Environment()["PLATFORM"] != "win32" else [ "/permissive-", "/D_USE_MATH_DEFINES", "/Zc:externC-", "/DBOOST_ALL_NO_LIB" ],
92100
)
93101

94102
o.Add(

0 commit comments

Comments
 (0)