SFML community forums

Help => General => Topic started by: ILikeSfml on July 06, 2021, 12:28:46 pm

Title: cmake dependecies link
Post by: ILikeSfml on July 06, 2021, 12:28:46 pm
Hello I got as here https://en.sfml-dev.org/forums/index.php?topic=27663.0 but I dont know totally anything about cmake and I just cant link as described in that topic. This is this

Code: [Select]
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "SFML-2.5.1\\extlibs\\headers")   
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "SFML-2.5.1\\extlibs\\libs-msvc\\x86")   

Can sb tell me how to add this to cmake call?

Code: [Select]
   cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=I_know_here_is_my_path -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_BUILD_TYPE=Debug ../..

which is from here https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

Thanks in advance  :)
Title: Re: cmake dependecies link
Post by: eXpl0it3r on July 06, 2021, 03:53:28 pm
See the basic example in the following thread: https://en.sfml-dev.org/forums/index.php?topic=24070.0

If you don't know anything about CMake, then it's time to learn some ;)
- Official CMake (https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html)
- It's Time To Do CMake Right (https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/)
- Better CMake (https://www.youtube.com/playlist?list=PL8i3OhJb4FNV10aIZ8oF0AA46HgA2ed8g)
Title: Re: cmake dependecies link
Post by: ILikeSfml on July 07, 2021, 10:33:43 am
Thanks for nice sources! But could you help me with this?
Exact error I get is:
Code: [Select]
CMake Error at D:/path_to_cmake/cmake-3.21.0-rc2-windows-x86_64/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)

But when I call cmake without parameters, cmake (so I just call "-cmake ../..") builds fine but it isnt usable, what's strange is that it sees openal and other dependiences. I looked for linking libraries and includes in cmake's documentation but it doesnt do anything at all. Cmake seems to ignore it  :(
Could you help what should I write and where (in cmd or in cmakelists.txt)?