lpac/dlfcn-win32
Coelacanthus 2cd764e57f
feat: $PWD independent executable file (#23)
* feat: $PWD independent executable file

- Use RPATH on Linux/macOS to ensure it will search directory that
  contains lpac executable file.
- Windows doesnn't has RPATH, but it will search executable file
  directory by default. And CMake will ignore BUILD_RPATH property on
  Windows safely.
- BUILD_RPATH doesn't affect files after cmake --install, but we doesn't
  declare install rule now (And we use RUNTIME_OUTPUT_DIRECTORY so we
  actually use non-install-style). If we need install-style in future,
  we can set INSTALL_RPATH_USE_LINK_PATH property so CMake will ensure
  it will work.

* fix(dlfcn-win32): remove LOAD_WITH_ALTERED_SEARCH_PATH to avoid UB and ensure PWD-independent-exe work

If use LOAD_WITH_ALTERED_SEARCH_PATH, relative path will lead to
undefined behavior. And it can't provide expected behavior because it
just change search order rather than remove binary directory.

See also: https://github.com/dlfcn-win32/dlfcn-win32/issues/104
2023-12-16 20:24:19 +08:00
..
CMakeLists.txt new curl interface 2023-11-14 18:03:22 +08:00
dlfcn.c feat: $PWD independent executable file (#23) 2023-12-16 20:24:19 +08:00
dlfcn.h new curl interface 2023-11-14 18:03:22 +08:00