diff --git a/FindRequiredPackage.cmake b/FindRequiredPackage.cmake index 7984030..1c44e37 100644 --- a/FindRequiredPackage.cmake +++ b/FindRequiredPackage.cmake @@ -23,6 +23,8 @@ # endif () macro (FindRequiredPackage packageName) + message(DEPRECATION "Remove in v7.1. Use find_package's REQUIRED argument instead.") + string(TOUPPER ${packageName} upperPackageName) if ((DEFINED ${upperPackageName}_ROOT_DIR) AND (DEFINED CMAKE_PREFIX_PATH)) set(CMAKE_PREFIX_SAVE ${CMAKE_PREFIX_PATH}) diff --git a/FindSubnetTree.cmake b/FindSubnetTree.cmake index a14f570..f498983 100644 --- a/FindSubnetTree.cmake +++ b/FindSubnetTree.cmake @@ -2,7 +2,7 @@ # # Usage of this module as follows: # -# find_package(PythonInterp REQUIRED) +# find_package(Python REQUIRED COMPONENTS Interpreter) # find_package(SubnetTree) # # Variables defined by this module: @@ -10,7 +10,7 @@ # SUBNETTREE_FOUND Python successfully imports SubnetTree module if (NOT SUBNETTREE_FOUND) - execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import SubnetTree" + execute_process(COMMAND "${Python_EXECUTABLE}" -c "import SubnetTree" RESULT_VARIABLE SUBNETTREE_IMPORT_RESULT) if (SUBNETTREE_IMPORT_RESULT)