Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dlib Detection and Support for Python Virtual Environments #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

radeonthe1st
Copy link

What this PR does:

  • Fixes detection of Dlib headers and libraries in CMake.
  • Adds support for Dlib installed via virtual environments.
  • Allows manual overrides with DLIB_INCLUDE_DIR and DLIB_LIBRARY.

Why this is needed:

  • Users building the XML generator faced "dlib/data_io.h: No such file" errors when using virtual environments.
  • This PR ensures Dlib is detected from system paths, virtual environments, or manually specified paths.

Testing:

  • Tested successfully on a local virtual environment and system-wide Dlib.

- Enhanced Dlib detection by adding support for Python  virtual environments.
- Allows manual specification using DLIB_INCLUDE_DIR and DLIB_LIBRARY.
- Provides clearer error messages and instructions if Dlib is not found.
- Added logic to load FindDlib.cmake from the cmake directory.
- Ensured Dlib paths are correctly linked to the xml_generator target.
- Improved compatibility with custom and virtual environment builds.
- Explicitly included Dlib headers and libraries for the xml_generator target.
- Ensures correct linking regardless of Dlib installation method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant