Skip to content

Registering a Pure C++ Native Module within a library #286

Discussion options

You must be logged in to vote

Ah I have also implemented it on Android using the same author's video for Android: https://www.youtube.com/watch?v=ibgHObp8YwA&t=8s. This commit 79aa951 demonstrates it.

In particular not registering the module within the <name>Package.kt file but instead adding to the react-native.config.js file the values for cxxModuleCMakeListsModuleName, cxxModuleCMakeListsPath & cxxModuleHeaderName, which I think is documented in the autolinking docs.

module.exports = {
  dependency: {
    platforms: {
      android: {
        cmakeListsPath: 'generated/jni/CMakeLists.txt',
+        cxxModuleCMakeListsModuleName: 'pure-cpp-turbo-module-library',
+        cxxModuleCMakeListsPath: 'CMakeLists.txt',
+

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Zach-Dean-Attractions-io
Comment options

Answer selected by cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant