0
votes

Following is my CMakeLists.txt file

cmake_minimum_required(VERSION 3.4.1)

add_library( native-lib SHARED src/main/cpp/native-lib.cpp )

find_library( log-lib log )

target_link_libraries( native-lib ${log-lib} )

I have specified, SHARED in add_library since I want a shared object library.

But it is not giving me the so file.

what am I missing?

1
After you've created CMakeLists.txt, what do you do?Ivan Aksamentov - Drop
i just cd into the directory containing my cpp files and i run makeuser3600801

1 Answers

1
votes

You know that CMake doesn't compile anything ? It just configures a Makefile (or IDE project's files) for you.

Generate your Makefile / Visual Studio / What ever you use file project via CMake and then compile.

You will have your library then ;)