mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
Add some lib directories compiler option (#255)
* Add OPENCV_DIRECTORY option to provide the ability to specify the installed opecv lib pat * Use find_package for opencv in windows, mac and linux * Fix opencv cmake * Fix python lib rpath setting * fix mac python package * Add some promt when use different opencv lib * add status message * Fix the backslash * Fix python package user defined libs * Fix windows python process libs * Add windows lib set path
This commit is contained in:
@@ -16,6 +16,8 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
user_specified_dirs = ['@OPENCV_DIRECTORY@', ]
|
||||
|
||||
|
||||
def is_built_with_gpu() -> bool:
|
||||
return True if "@WITH_GPU@" == "ON" else False
|
||||
@@ -143,11 +145,13 @@ if os.name == "nt":
|
||||
current_path = os.path.abspath(__file__)
|
||||
dirname = os.path.dirname(current_path)
|
||||
third_libs_dir = os.path.join(dirname, "libs")
|
||||
add_dll_search_dir(third_libs_dir)
|
||||
for root, dirs, filenames in os.walk(third_libs_dir):
|
||||
for d in dirs:
|
||||
if d == "lib" or d == "bin":
|
||||
add_dll_search_dir(os.path.join(dirname, root, d))
|
||||
all_dirs = user_specified_dirs + [third_libs_dir]
|
||||
for dir in all_dirs:
|
||||
add_dll_search_dir(dir)
|
||||
for root, dirs, filenames in os.walk(dir):
|
||||
for d in dirs:
|
||||
if d == "lib" or d == "bin":
|
||||
add_dll_search_dir(os.path.join(dirname, root, d))
|
||||
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user