1

I want to use include_external_msproject to add a .androidproj ant build package but it seems this function only likes .vcxproj files. Does cmake check the file suffix or project guid to identify the type?

Thanks

1 Answer 1

0

I know it's an old question, but the answer might be relevant to those searching for include_external_msproject and androidproj. You actually CAN add androidproj with include_external_msproject, but you have to specify project TYPE, e.g.:

  include_external_msproject(targetName 
        Path/To/Project/project.androidproj 
        TYPE 39E2626F-3545-4960-A6E8-258AD8476CE5 
        cmakeTargetName)

It works, at least with CMake 3.26 + Visual Studio 2022.

It ends up slightly less useful than I'd like - since this is not a "normal" CMake target, you can't make it link a library generated by another target (this would require CMake to modify the androidproj, but it doesn't "own" it), so my goal of generating a VS project that can build an APK that depends on a native library remains unrealized for now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.