diff -Naur orig/appleseed-2.1.0-beta/src/appleseed.python/CMakeLists.txt appleseed-2.1.0-beta/src/appleseed.python/CMakeLists.txt --- orig/appleseed-2.1.0-beta/src/appleseed.python/CMakeLists.txt 2020-06-21 14:33:19.991451200 +0200 +++ appleseed-2.1.0-beta/src/appleseed.python/CMakeLists.txt 2020-06-21 15:05:11.215126100 +0200 @@ -34,8 +34,10 @@ set (BOOST_NEEDED_LIBS) +# Don't use Boost_VERSION directly as it changed format with Boost 1.70. + if (WITH_PYTHON2_BINDINGS) - if (Boost_VERSION GREATER_EQUAL 106700) + if ((Boost_MAJOR_VERSION GREATER 1) OR (Boost_MINOR_VERSION GREATER_EQUAL 67)) set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} python27) else () set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} python) @@ -46,14 +48,14 @@ find_package (Python3 REQUIRED) find_package (OpenGL REQUIRED) - if (Boost_VERSION GREATER_EQUAL 106700) - set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} python35) + if ((Boost_MAJOR_VERSION GREATER 1) OR (Boost_MINOR_VERSION GREATER_EQUAL 67)) + set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} python39) else () set (BOOST_NEEDED_LIBS ${BOOST_NEEDED_LIBS} python3) endif () endif () -find_package (Boost 1.61 COMPONENTS ${BOOST_NEEDED_LIBS}) +find_package (Boost 1.61 REQUIRED COMPONENTS ${BOOST_NEEDED_LIBS}) #-------------------------------------------------------------------------------------------------- @@ -235,9 +237,18 @@ target_link_libraries (appleseed.python appleseed - ${Boost_PYTHON_LIBRARY} # Only Boost.Python2 library - ${PYTHON_LIBRARIES} + ${Boost_PYTHON_LIBRARY} # Only Boost.Python2 library ) + + if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries (appleseed.python + ${PYTHON_LIBRARIES} + ) + endif () + + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_target_properties (appleseed.python PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + endif () endif () if (WITH_PYTHON3_BINDINGS) @@ -245,11 +256,20 @@ target_link_libraries (appleseed.python3 appleseed - ${Boost_PYTHON3_LIBRARY} # Only Boost.Python3 library glad - ${PYTHON3_LIBRARY} + ${Boost_PYTHON3_LIBRARY} # Only Boost.Python3 library ) + if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries (appleseed.python3 + ${PYTHON3_LIBRARY} + ) + endif () + + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_target_properties (appleseed.python3 PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + endif () + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries (appleseed.python3 util --- orig/appleseed-2.1.0-beta/CMakeLists.txt 2020-06-21 14:33:15.782637900 +0200 +++ appleseed-2.1.0-beta/CMakeLists.txt 2020-06-21 15:01:25.819131200 +0200 @@ -239,6 +239,10 @@ set (Boost_USE_STATIC_LIBS TRUE) endif () +# Boost 1.70 breaks compatibility with the old way of doing things. This restores compatibility. +# See https://gitlab.kitware.com/cmake/cmake/issues/18865 for details. +set (Boost_NO_BOOST_CMAKE ON) + find_package (Boost 1.61 REQUIRED COMPONENTS atomic chrono date_time filesystem regex system thread wave) add_definitions (-DBOOST_FILESYSTEM_VERSION=3 -DBOOST_FILESYSTEM_NO_DEPRECATED)