Skip to content

build: idapython: Fix pywraps.hpp path and move CMake support to plugin#47

Open
0xeb wants to merge 1 commit into
HexRaysSA:mainfrom
lallouslab:cmake-idapython
Open

build: idapython: Fix pywraps.hpp path and move CMake support to plugin#47
0xeb wants to merge 1 commit into
HexRaysSA:mainfrom
lallouslab:cmake-idapython

Conversation

@0xeb
Copy link
Copy Markdown
Collaborator

@0xeb 0xeb commented Apr 4, 2026

Summary

  • Replace hardcoded #include "../../../pywraps.hpp" in header.i.in with a parameterized path via genswigheader.py --pywraps-dir, eliminating source tree pollution from the configure_file() copy hack
  • Move IDAPythonSupport.cmake from the ida-cmake submodule into src/plugins/idapython/cmake/ so IDAPython owns its own build pipeline and the submodule stays generic
  • Enable idapython subdirectory in the plugins build

Backward compatible: --pywraps-dir defaults to ../../.. so GNU Make builds produce identical output.

@0xeb 0xeb force-pushed the cmake-idapython branch 2 times, most recently from 20692ae to 4b02f0f Compare April 4, 2026 21:31
- Replace hardcoded #include "../../../pywraps.hpp" with parameterized
  path via genswigheader.py --pywraps-dir (defaults to ../../.. for
  GNU Make backward compatibility)
- Move IDAPythonSupport.cmake from ida-cmake submodule to
  src/plugins/idapython/cmake/ (keeps submodule generic)
- Remove configure_file() hack that copied headers to source tree
- Fix additional hardcoded paths in swig/diskio.i and swig/nalt.i
- Enable idapython subdirectory in plugins build
@0xeb 0xeb force-pushed the cmake-idapython branch from 4b02f0f to 87512b5 Compare April 4, 2026 21:44
@adybov-hexrays
Copy link
Copy Markdown
Collaborator

Hey @0xeb , thanks for putting this together! We actually have an ongoing CMake idapython build effort internally that we're planning to ship. I'd prefer to hold off on merging this for now and instead align both efforts - that way we avoid having to rework things after the fact. Would you be okay with that?

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.

2 participants