Skip to content

Commit

Permalink
Fix H19.5 ABI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScheller committed Dec 10, 2023
1 parent 7f2d73f commit 4044be5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ endif()
set(AR_BOOST_INCLUDE_DIR ${AR_HOUDINI_INCLUDE_DIR}/${AR_BOOST_NAMESPACE})

### Init ###
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
project(${AR_PROJECT_NAME} VERSION 1.0.0 LANGUAGES CXX)

### CPP Settings ###
Expand All @@ -137,7 +137,14 @@ 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)
file(REAL_PATH ${AR_HOUDINI_ROOT} AR_HOUDINI_ROOT_RESOLVED)
string(FIND ${AR_HOUDINI_ROOT_RESOLVED} "19.5" AR_HOUDINI_ROOT_IS_H195)
if (${AR_HOUDINI_ROOT_IS_H195} STREQUAL "-1")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=1)
else()
message("Houdini 19.5 detected, switching to _GLIBCXX_USE_CXX11_ABI=0")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
endif()
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")
Expand Down

0 comments on commit 4044be5

Please sign in to comment.