Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin62628 authored Mar 7, 2022
1 parent c05d2e7 commit 3a33e0d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions rife_ncnn_vulkan_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@ find_package(OpenMP)
find_package(Vulkan REQUIRED)

# Python
if(${CMAKE_VERSION} VERSION_LESS "3.15")
find_package(Python REQUIRED)
if (DEFINED PY_VERSION)
if (${CMAKE_VERSION} VERSION_LESS "3.15")
find_package(Python ${PY_VERSION} EXACT REQUIRED)
else()
find_package(Python ${PY_VERSION} EXACT REQUIRED COMPONENTS Development)
endif()
else()
find_package(Python REQUIRED COMPONENTS Development)
if (${CMAKE_VERSION} VERSION_LESS "3.15")
find_package(Python REQUIRED)
else()
find_package(Python REQUIRED COMPONENTS Development)
endif()
endif()

# SWIG
Expand Down

0 comments on commit 3a33e0d

Please sign in to comment.