Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Using Java from static library with Qt 6 CMake project. How?

Using Java from static library with Qt 6 CMake project. How?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 78 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by bogong
    #1

    Hello!

    Trying to find any example of how to use Java from static library with Qt 6 CMake project. Is there any? Or detailed manual?

    Need to add multiple Java sources that is inside of multiple static libraries. Something like this:

    project-root/
    │
    ├─ CMakeLists.txt 
    ├─ app/
    │   ├─ CMakeLists.txt
    │   └─ main.cpp
    └─ mylib1/
    │   ├─ CMakeLists.txt
    │   ├─ mylib1.cpp
    │   ├─ mylib1.h
    │   └─ android/
    │       └─ src/org/example/mylib1/MyLib1Java.java
    └─ mylib2/
        ├─ CMakeLists.txt
        ├─ mylib2.cpp
        ├─ mylib2.h
        └─ android/
            └─ src/org/example/mylib2/MyLib2Java.java
    

    Is standard Qt CMake function could handler adding Java from multiple libraries?

    Will it be working automatically if in static library something like this in CMakeLists.txt:

    set_property(TARGET mylib1 PROPERTY ANDROID_PACKAGE_SOURCE_DIR
        ${CMAKE_CURRENT_SOURCE_DIR}/android
    )
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved