Repository navigation
Conversation
Co-authored-by: Junie <junie@jetbrains.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of the CMake migration plan: the ActiveX control (
MapWinGIS.ocx, static ATL, apartment threaded). The MSBuild.slnxbuild is unchanged.Changes
cmake/MwgMidl.cmake:mwg_add_midl_target()runsmidl.exethrough one explicit custom command for every generator (Ninja has no.idlsupport), with the MSBuild options/W1 /char signed /env x64|win32 /target NT60. Output goes to<build>/src/MapWinGIS.ActiveX/midl, and an INTERFACE target exposes that directory (D3). It stops configure with a clear message whenmidl.exeis missing, or whencl.exeis not onPATHunder Ninja.src/MapWinGIS.ActiveX/CMakeLists.txt:SHAREDtarget,OUTPUT_NAME MapWinGIS,SUFFIX .ocx. The.def,.rcand.rgsare sources. The.rcgets anOBJECT_DEPENDSon the generated.tlb, plus a target dependency on the MIDL target._ATL_APARTMENT_THREADEDis set on C/C++ only, RC gets/l0x0409, and the Windows libs from the audit are linked explicitly.DEFINE_SYMBOL ""keeps CMake'sMapWinGIS_ActiveX_EXPORTSout. The six shared ActiveX sources are exported asMWG_ACTIVEX_SHARED_SOURCESfor the tests (D4, Phase 3).cmake/MwgCompilerOptions.cmake:/TCfor C sources (CMake only emits/TPfor C++)._i.cis matched by file name..rcentries incompile_commands.jsonare skipped.BUILDING.md(ATL/MIDL prerequisites, per-user registration) and the OCX parity status inCMAKE-MIGRATION.md.Verification
dumpbinshows identical dependents, the 5 COM exports (DllCanUnloadNow,DllGetClassObject,DllRegisterServer,DllUnregisterServer,DllInstall), and the same subsystem and DLL characteristics.MapWinGIS.ActiveX_i.his identical below its header comment.-j32Ninja builds passed (no MIDL/RC race). The VS generator builds x64 Debug/Release and x86 Debug with 0 warnings.regsvr32 /n /i:user→New-Object -ComObject MapWinGIS6.Control→ unregister works for the x64 and the Win32 OCX (32-bit PowerShell).git statusis clean after the builds; nothing is generated in the source tree.Explained differences
The MIDL include directory moved per D3. There is no vcpkg include dir, because the OCX doesn't use GDAL directly. The
.resname differs. The Core import library comes fromtarget_link_librariesinstead of the project reference.Known limitations
Verify-ActiveXActivation.ps1run moves to Phase 3, because it needs the test executable..slnxbuild was not rebuilt in this worktree; no MSBuild file changed.Dependencies
Stacked on #40 (Phase 1,
cmake-phase-1-core), which is stacked on #39.