Skip to content

Commit 0efa8a0

Browse files
committed
Improve Nuke build instructions
1 parent f9816be commit 0efa8a0

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,12 @@ elseif("$ENV{AR_DCC_NAME}" STREQUAL "NUKE")
311311
# Nuke
312312
set(AR_NUKE_ROOT $ENV{NUKE_ROOT} CACHE PATH "Nuke install directory")
313313
# Python
314+
set(AR_PYTHON_ROOT $ENV{PYTHON_ROOT} CACHE PATH "Python install directory (only needed on Windows)")
314315
if (WIN32)
315316
if(EXISTS "${AR_NUKE_ROOT}/python311.dll")
316317
set(AR_PYTHON_LIB python311)
317318
set(AR_PYTHON_LIB_NUMBER python311)
318-
elseif(EXISTS "${AR_MAYA_USD_SDK_LIB_DIR}/python310.dll")
319+
elseif(EXISTS "${AR_NUKE_ROOT}/python310.dll")
319320
set(AR_PYTHON_LIB python310)
320321
set(AR_PYTHON_LIB_NUMBER python310)
321322
else()
@@ -334,7 +335,7 @@ elseif("$ENV{AR_DCC_NAME}" STREQUAL "NUKE")
334335
endif()
335336
if (WIN32)
336337
set(AR_PYTHON_LIB_DIR ${AR_NUKE_ROOT})
337-
set(AR_PYTHON_INCLUDE_DIR ${AR_NUKE_ROOT}/include)
338+
set(AR_PYTHON_INCLUDE_DIR ${AR_PYTHON_ROOT}/include)
338339
else()
339340
set(AR_PYTHON_LIB_DIR ${AR_NUKE_ROOT})
340341
set(AR_PYTHON_INCLUDE_DIR ${AR_NUKE_ROOT}/include/${AR_PYTHON_LIB})
@@ -345,18 +346,12 @@ elseif("$ENV{AR_DCC_NAME}" STREQUAL "NUKE")
345346
set(AR_TBB_LIB_DIR ${AR_NUKE_ROOT}/lib)
346347
set(AR_TBB_INCLUDE_DIR ${AR_TBB_ROOT}/include)
347348
# Usd
348-
if (WIN32)
349-
set(AR_PXR_LIB_DIR ${AR_NUKE_ROOT}/FnUSD/lib)
350-
else()
351-
set(AR_PXR_LIB_DIR ${AR_NUKE_ROOT}/FnUSD/lib)
352-
endif()
349+
set(AR_PXR_LIB_DIR ${AR_NUKE_ROOT}/FnUSD/lib)
353350
set(AR_PXR_LIB_PREFIX "usd_")
354351
set(AR_PXR_INCLUDE_DIR ${AR_NUKE_ROOT}/FnUSD/include)
355352
set(AR_PXR_PYTHON_LIB_SITEPACKAGES ${AR_NUKE_ROOT}/FnUSD/lib/python)
356353
# Boost
357354
# See our building.md Nuke section for more info on why we use foundryboost here.
358-
add_compile_definitions(boost=foundryboost)
359-
set(AR_BOOST_ROOT $ENV{BOOST_ROOT})
360355
if(EXISTS "${AR_PXR_INCLUDE_DIR}/pxr/external/boost")
361356
set(AR_BOOST_PXR_EXTERNAL_EXISTS 1)
362357
set(AR_BOOST_NAMESPACE pxr_boost)
@@ -367,6 +362,8 @@ elseif("$ENV{AR_DCC_NAME}" STREQUAL "NUKE")
367362
set(AR_BOOST_LIB_DIR ${AR_PXR_LIB_DIR})
368363
set(AR_BOOST_INCLUDE_DIR ${AR_PXR_INCLUDE_DIR})
369364
else()
365+
add_compile_definitions(boost=foundryboost)
366+
set(AR_BOOST_ROOT $ENV{BOOST_ROOT})
370367
set(AR_BOOST_PXR_EXTERNAL_EXISTS 0)
371368
set(AR_BOOST_NAMESPACE foundryboost)
372369
set(AR_BOOST_FOLDER_NAMESPACE foundryboost)

docs/src/installation/building.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export AR_DCC_NAME=nuke
4141
export NUKE_ROOT="/path/to/nuke/root"
4242
export BOOST_ROOT="/path/to/boost/root" # The .../include/boost folder must be renamed to .../include/foundryboost
4343
export TBB_ROOT="/path/to/tbb/root"
44+
export PYTHON_ROOT="/path/to/python/root" # Windows only
4445
## Resolver
4546
export AR_RESOLVER_NAME=fileResolver
4647
@@ -61,6 +62,7 @@ set AR_DCC_NAME=nuke
6162
set NUKE_ROOT="/path/to/nuke/root"
6263
set BOOST_ROOT="/path/to/boost/root" # The .../include/boost folder must be renamed to .../include/foundryboost
6364
set TBB_ROOT="/path/to/tbb/root"
65+
set PYTHON_ROOT="/path/to/python/root" # Windows only
6466
## Resolver
6567
set AR_RESOLVER_NAME=fileResolver
6668
```
@@ -120,10 +122,10 @@ On Linux, we either compile it ourselves or use our system package manager to in
120122

121123
### Nuke
122124

123-
Nuke has two additional requirements:
124-
125-
- TBB: Nuke itself does not ship with the necessary TBB headers, instead only with the libs. We either have to self compile these or alternatively we can link to an existing compatible TBB header folder. We then have to specify the root folder by setting the `TBB_ROOT` env var.
126-
- Boost: Nuke itself does not ship with the necessary boost headers, instead only with the libs. These are namespaced (file and symbol-wise) to `foundryboost`. To successfully compile, we'll have to self-compile boost and then copy/symlink the `<root>/include/boost` folder to `<root>/include/foundryboost`. Alternatively we can copy an existing compatible boost header folder to a new location and also copy/symlink it `<root>/include/foundryboost`. This way we have identical headers for both symbols. We then have to specify the root folder by setting the `BOOST_ROOT` env var.
125+
Nuke has the following additional requirements:
126+
- Python (Windows Only): Nuke itself does not ship with the necessary python headers on Windows, instead only with the libs. We either have to self compile or alternatively link to an existing compatible python header folder. Our build script expects the root folder to by specified by the `PYTHON_ROOT` env var.
127+
- TBB: Nuke itself does not ship with the necessary TBB headers, instead only with the libs. We either have to self compile or alternatively link to an existing compatible TBB header folder. Our build script expects the root folder to by specified by the `TBB_ROOT` env var.
128+
- Boost: Nuke itself does not ship with the necessary boost headers, instead only with the libs. These are namespaced (file and symbol-wise) to `foundryboost`. To successfully compile, we'll have to self-compile boost and then copy/symlink the `<root>/include/boost` folder to `<root>/include/foundryboost`. Alternatively we can copy an existing compatible boost header folder to a new location and also copy/symlink it `<root>/include/foundryboost`. This way we have identical headers for both symbols. Our build script expects the root folder to by specified by the `BOOST_ROOT` env var.
127129

128130
Here is the boost situation explain in more detail:
129131
- Nuke does not ship with boost headers

0 commit comments

Comments
 (0)