Windows Release missing cmakelists.txt? Required for CMake projects? v2.6.0

Greetings! I’m trying to add Nakama to my cmake project as a static library.

The docs say:

When you’ve downloaded the Nakama C++ archive and extracted it to NAKAMA_CPP_SDK folder, you should include it in your project.

I have created a folder called NAKAMA_CPP_SDK in my project root and unzipped the contents of to that folder.

Then I added these two lines to my cmakelists.txt in the project root:

add_subdirectory(NAKAMA_CPP_SDK ${CMAKE_CURRENT_BINARY_DIR}/nakama-cpp)
target_link_libraries(${APP_NAME} ext_nakama-cpp)

When I do that, cmake complains:

  add_subdirectory given source "NAKAMA_CPP_SDK" which is not an existing

If provide an absolute path to the nakama files, it finds them but then it complains:
[path] does not contain a CMakeLists.txt file.

I’m not a cmake wizard, but I think I’ve followed the directions here. Thank you for any assistance!

Hello, firstly you’d need to use find_package instead of add_subdirectory but also there is a bug which currently prevents static builds which is going to be fixed asap so keep an eye on the next release.

1 Like