diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | cmake/python-backport/FindPackageHandleStandardArgs.cmake (renamed from cmake/FindPackageHandleStandardArgs.cmake) | 0 | ||||
-rw-r--r-- | cmake/python-backport/FindPackageMessage.cmake (renamed from cmake/FindPackageMessage.cmake) | 0 | ||||
-rw-r--r-- | cmake/python-backport/FindPython.cmake (renamed from cmake/FindPython.cmake) | 0 | ||||
-rw-r--r-- | cmake/python-backport/FindPython/Support.cmake (renamed from cmake/FindPython/Support.cmake) | 0 | ||||
-rw-r--r-- | cmake/python-backport/SelectLibraryConfigurations.cmake (renamed from cmake/SelectLibraryConfigurations.cmake) | 0 |
6 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index aa5342ee..73bdec05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ set(Ledger_TEST_TIMEZONE "America/Chicago") # Point CMake at any custom modules we may ship list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") +if(${CMAKE_VERSION} VERSION_LESS "3.16.0") + # use backported module from 3.15 (introduced 3.12) to support older versions of cmake + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/python-backport") +endif() enable_testing() @@ -65,7 +69,7 @@ if (USE_PYTHON) if (PYTHON_FOUND) set(BOOST_PYTHON "python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}") set(HAVE_BOOST_PYTHON 1) - include_directories(SYSTEM ${Python_INCLUDE_DIR}) + include_directories(SYSTEM ${Python_INCLUDE_DIRS}) else() set(HAVE_BOOST_PYTHON 0) message("Could not find a Python library to use with Boost.Python") @@ -163,7 +167,7 @@ if (HAVE_BOOST_PYTHON) cmake_push_check_state() set(CMAKE_REQUIRED_INCLUDES - ${CMAKE_INCLUDE_PATH} ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIR}) + ${CMAKE_INCLUDE_PATH} ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS}) set(CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES} ${Python_LIBRARIES} ${PROFILE_LIBS}) diff --git a/cmake/FindPackageHandleStandardArgs.cmake b/cmake/python-backport/FindPackageHandleStandardArgs.cmake index 1722d6aa..1722d6aa 100644 --- a/cmake/FindPackageHandleStandardArgs.cmake +++ b/cmake/python-backport/FindPackageHandleStandardArgs.cmake diff --git a/cmake/FindPackageMessage.cmake b/cmake/python-backport/FindPackageMessage.cmake index 0628b981..0628b981 100644 --- a/cmake/FindPackageMessage.cmake +++ b/cmake/python-backport/FindPackageMessage.cmake diff --git a/cmake/FindPython.cmake b/cmake/python-backport/FindPython.cmake index e2f3bf34..e2f3bf34 100644 --- a/cmake/FindPython.cmake +++ b/cmake/python-backport/FindPython.cmake diff --git a/cmake/FindPython/Support.cmake b/cmake/python-backport/FindPython/Support.cmake index de98ee20..de98ee20 100644 --- a/cmake/FindPython/Support.cmake +++ b/cmake/python-backport/FindPython/Support.cmake diff --git a/cmake/SelectLibraryConfigurations.cmake b/cmake/python-backport/SelectLibraryConfigurations.cmake index 4c0e9a8c..4c0e9a8c 100644 --- a/cmake/SelectLibraryConfigurations.cmake +++ b/cmake/python-backport/SelectLibraryConfigurations.cmake |