Skip to content

Commit 62cd036

Browse files
Seperate libs
1 parent 59dc11b commit 62cd036

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/cpp/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,23 @@ project("qrcodegenerator")
1414
# You can define multiple libraries, and CMake builds them for you.
1515
# Gradle automatically packages shared libraries with your APK.
1616

17+
add_library( # Sets the name of the library.
18+
externalqrgenlib
19+
20+
# Sets the library as a shared library.
21+
SHARED
22+
23+
# Provides a relative path to your source file(s).
24+
"external_libs/qrcodegen.cpp")
25+
1726
add_library( # Sets the name of the library.
1827
qrcodegenerator
1928

2029
# Sets the library as a shared library.
2130
SHARED
2231

2332
# Provides a relative path to your source file(s).
24-
native-lib.cpp "external_libs/qrcodegen.cpp")
33+
native-lib.cpp)
2534

2635
# Searches for a specified prebuilt library and stores the path as a
2736
# variable. Because CMake includes system libraries in the search path by
@@ -42,7 +51,7 @@ find_library( # Sets the name of the path variable.
4251

4352
target_link_libraries( # Specifies the target library.
4453
qrcodegenerator
45-
54+
externalqrgenlib
4655
# Links the target library to the log library
4756
# included in the NDK.
4857
${log-lib})

0 commit comments

Comments
 (0)