Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Redirect to new behavior for Cmake which Greater or Equal 3.30)

Abelb8546038e1fb
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index bd6cf3b3a..603e5b16a 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -542,19 +542,24 @@ include_directories(
)
if(BUILD_ENV_MSVC OR BUILD_ENV_APPLE)
- find_path(
- BOOST_ROOT
- include/boost
- boost
- HINTS
- ${THIRDPARTY_LIBS_HINTS}
- PATH_SUFFIXES
- boost/boost_1_75_0/
- boost/boost_1_74_0/
- boost/boost_1_73_0/
- boost/boost_1_72_0/
- )
- find_package(Boost 1.55 REQUIRED)
+ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.30)
+ set(BOOST_DIR ${BOOST_ROOT})
+ find_package(Boost)
+ else()# Cmake version below 3.30
+ find_path(
+ BOOST_ROOT
+ include/boost
+ boost
+ HINTS
+ ${THIRDPARTY_LIBS_HINTS}
+ PATH_SUFFIXES
+ boost/boost_1_75_0/
+ boost/boost_1_74_0/
+ boost/boost_1_73_0/
+ boost/boost_1_72_0/
+ )
+ find_package(Boost 1.55 REQUIRED)
+ endif()
else()
find_package(Boost)
endif()