ArtifactsPrefix.cmake 642 B

12345678910111213141516171819202122
  1. enable_language(C)
  2. set(Python_ARTIFACTS_PREFIX "_V2")
  3. find_package (Python 2 EXACT REQUIRED)
  4. if(NOT Python_V2_FOUND OR NOT Python_FOUND)
  5. message(FATAL_ERROR "Python v2 interpreter not found.")
  6. endif()
  7. if(NOT Python_V2_VERSION_MAJOR VERSION_EQUAL 2)
  8. message(FATAL_ERROR "Python v2 interpreter: wrong major version.")
  9. endif()
  10. set(Python_ARTIFACTS_PREFIX "_V3")
  11. find_package (Python 3 EXACT REQUIRED)
  12. if(NOT Python_V3_FOUND OR NOT Python_FOUND)
  13. message(FATAL_ERROR "Python v3 interpreter not found.")
  14. endif()
  15. if(NOT Python_V3_VERSION_MAJOR VERSION_EQUAL 3)
  16. message(FATAL_ERROR "Python v3 interpreter: wrong major version.")
  17. endif()