C++ Library for Desktop Build

I just started to learn KMP and I want to see how to integrate C++ code into my project. I successfully edited the build.gradle.kts to build a C++ library for Android and have called a JNI function in the library.

// composeApp/build.gradle.kts

android {
...
    externalNativeBuild {
        cmake {
            path = file("src/main/cpp/CMakeLists.txt")
            version = "3.22.1"
        }
    }

But the desktop version is not able to do the same. If it helps. So far I added the following:

compose.desktop {
    application {
...

        jvmArgs += "-Djava.library.path=${project.projectDir}/src/main/cpp/lib"
    }
}

I can’t find an example of how to do this and I can’t find any docs either. Any assistance to help me learn would be appreciated.