diff options
author | Andy Clayton <q3aiml@gmail.com> | 2020-05-17 15:13:17 -0500 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2020-05-18 12:28:29 +0800 |
commit | 54d6128e2a7792726d6080e415636186117be363 (patch) | |
tree | 2b1e1188384297623b67068ddddf75c18c10b331 | |
parent | 9551b0f73e40b3d9a2f64134fd37c1784b34f063 (diff) | |
download | fork-ledger-54d6128e2a7792726d6080e415636186117be363.tar.gz fork-ledger-54d6128e2a7792726d6080e415636186117be363.tar.bz2 fork-ledger-54d6128e2a7792726d6080e415636186117be363.zip |
use system FindPython if newer
Avoid needing to keep our copy updated and only keep it as a fallback
for when system cmake is not new enough.
-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 |