diff --git a/.github/scripts/houdini.py b/.github/scripts/houdini.py index 4bc4f62..4044813 100644 --- a/.github/scripts/houdini.py +++ b/.github/scripts/houdini.py @@ -91,13 +91,18 @@ def install_sidefx_houdini(): releases_list = sidefx_service.download.get_daily_builds_list(product=sidefx_product, platform=sidefx_platform, only_production=True) - latest_production_release = releases_list[0] + # Switch to new gcc version starting with H20 + for release in releases_list: + if release["version"] == "20.0": + if not release["platform"].endswith("gcc11.2"): + continue + latest_production_release = release + break latest_production_release_download = sidefx_service.download.get_daily_build_download(product='houdini', version=latest_production_release["version"], build=latest_production_release["build"], platform=sidefx_platform) - # Download latest production release logging.info('Downloading Houdini build {version}.{build}'.format(version=latest_production_release["version"], build=latest_production_release["build"])) diff --git a/CMakeLists.txt b/CMakeLists.txt index de5a5e7..c6dfbd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,11 @@ else() endif() # Houdini set(AR_HOUDINI_ROOT $ENV{HFS} CACHE PATH "Houdini install directory") -set(AR_HOUDINI_LIB_DIR ${AR_HOUDINI_ROOT}/custom/houdini/dsolib) +if (WIN32) + set(AR_HOUDINI_LIB_DIR ${AR_HOUDINI_ROOT}/custom/houdini/dsolib) +else() + set(AR_HOUDINI_LIB_DIR ${AR_HOUDINI_ROOT}/dsolib) +endif() set(AR_HOUDINI_INCLUDE_DIR ${AR_HOUDINI_ROOT}/toolkit/include) # Usd if (WIN32) @@ -82,11 +86,26 @@ else() set(AR_PXR_LIB_DIR ${AR_HOUDINI_ROOT}/dsolib) set(AR_PXR_LIB_PREFIX "pxr_") endif() - set(AR_PXR_INCLUDE_DIR ${AR_HOUDINI_INCLUDE_DIR}) # Python -set(AR_PYTHON_LIB python3.9) -set(AR_PYTHON_LIB_NUMBER python39) +if (WIN32) + if(EXISTS "${AR_HOUDINI_ROOT}/python310") + set(AR_PYTHON_LIB python3.10) + set(AR_PYTHON_LIB_NUMBER python310) + else() + set(AR_PYTHON_LIB python3.9) + set(AR_PYTHON_LIB_NUMBER python39) + endif() +else() + if(EXISTS "${AR_HOUDINI_ROOT}/python/bin/python3.10") + set(AR_PYTHON_LIB python3.10) + set(AR_PYTHON_LIB_NUMBER python310) + else() + set(AR_PYTHON_LIB python3.9) + set(AR_PYTHON_LIB_NUMBER python39) + endif() +endif() + if (WIN32) set(AR_PYTHON_LIB_DIR ${AR_HOUDINI_ROOT}/${AR_PYTHON_LIB_NUMBER}/libs) set(AR_PYTHON_LIB_SITEPACKAGES ${AR_HOUDINI_ROOT}/${AR_PYTHON_LIB_NUMBER}/lib/site-packages) @@ -111,9 +130,14 @@ project(${AR_PROJECT_NAME} VERSION 1.0.0 LANGUAGES CXX) ### CPP Settings ### set(BUILD_SHARED_LIBS ON) # Preprocessor Defines (Same as #define) -add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0 HBOOST_ALL_NO_LIB BOOST_ALL_NO_LIB) +add_compile_definitions(HBOOST_ALL_NO_LIB BOOST_ALL_NO_LIB) if (WIN32) add_compile_definitions(NOMINMAX) +else() + # Notes: + # Houdini 20 - Switched to the new C++11 ABI for Linux https://www.sidefx.com/docs/houdini/news/20/platforms.html + # For Houdini versions that use gcc 9.3, please set this to _GLIBCXX_USE_CXX11_ABI=0 + add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=1) endif() # Compiler Options # This is the same as set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHBOOST_ALL_NO_LIB -D_GLIBCXX_USE_CXX11_ABI=0") diff --git a/docs/src/installation/building.md b/docs/src/installation/building.md index c101dd7..c42528b 100644 --- a/docs/src/installation/building.md +++ b/docs/src/installation/building.md @@ -36,6 +36,17 @@ set RESOLVER_NAME=fileResolver ## Running the build To run the build, run: +~~~admonish warning title="Houdini GCC ABI Change" +Starting with Houdini 20, SideFX is offering gcc 11 builds. Our automatic builds use this version. +If you still want to use gcc 9, then you'll have to set the below in our main CMakeLists.txt file. +See the official [Release Notes](https://www.sidefx.com/docs/houdini/news/20/platforms.html) for more information. +```bash + ... + add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0) + ... +``` +~~~ + ~~~admonish info title="" ```bash # Linux diff --git a/setup.sh b/setup.sh index 2ea794c..17585df 100644 --- a/setup.sh +++ b/setup.sh @@ -8,7 +8,7 @@ then export RESOLVER_NAME=cachedResolver export RESOLVER_NAME_UPPERCASE=$(echo ${RESOLVER_NAME} | tr '[:lower:]' '[:upper:]') # Source Houdini (This defines what Houdini version to compile against) - pushd /opt/hfs19.5 > /dev/null + pushd /opt/hfs20.0 > /dev/null source houdini_setup popd > /dev/null export HOUDINI_LMINFO_VERBOSE=1