|
@@ -16,6 +16,7 @@ if (WIN32 AND NOT CYGWIN) # cygwin 不依赖 dl
|
|
wi_install_import(TARGETS dlfcn-win32::dl)
|
|
wi_install_import(TARGETS dlfcn-win32::dl)
|
|
endif()
|
|
endif()
|
|
else()
|
|
else()
|
|
|
|
+ set(DLFCN_AUTO_FIND FALSE CACHE BOOL "dlfcn auto find by compiler.")
|
|
set(DLFCN_ROOT "" CACHE STRING "The directory of dl.")
|
|
set(DLFCN_ROOT "" CACHE STRING "The directory of dl.")
|
|
set(dlfcn_root ${DLFCN_ROOT})
|
|
set(dlfcn_root ${DLFCN_ROOT})
|
|
if (dlfcn_root)
|
|
if (dlfcn_root)
|
|
@@ -25,9 +26,13 @@ else()
|
|
endif()
|
|
endif()
|
|
|
|
|
|
if (NOT dlfcn_path)
|
|
if (NOT dlfcn_path)
|
|
- set(DEPS_FOUND FALSE)
|
|
|
|
- message(SEND_ERROR "dlfcn not found.")
|
|
|
|
- endif()
|
|
|
|
|
|
+ if (DLFCN_AUTO_FIND)
|
|
|
|
+ set(dlfcn_path "")
|
|
|
|
+ else()
|
|
|
|
+ set(DEPS_FOUND FALSE)
|
|
|
|
+ message(SEND_ERROR "dlfcn not found.")
|
|
|
|
+ endif()
|
|
|
|
+ endif()
|
|
|
|
|
|
unset(dlfcn_root)
|
|
unset(dlfcn_root)
|
|
set(dlfcn_lib ${dlfcn_path})
|
|
set(dlfcn_lib ${dlfcn_path})
|