UnaNancyOwen / CubemosSample

Sample Program for Skeleton Tracking SDK by Cubemos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMAKE can't find k4a

pajama opened this issue · comments

Is this cmake file compatible with the binary installation of azure kinect sdk? I'm not familiar enough with cmake and have been struggling to get it to find the package. There is no FindK4a.cmake file in the source repo.

Thank you!

The Azure Kinect Sensor SDK included in the installer does not contain a CMake file (k4aConfig.cmake, ...) to find library. Please build and install Azure Kinect Sensor SDK from source code yourself.

@UnaNancyOwen thanks! I was able to build the kinect sensor sdk from source.

Is this the file that cmake needs?
C:/Azure-Kinect-Sensor-SDK/build/src/sdk/CMakeFiles/Export/lib/cmake/k4a/k4aConfig.cmake

I'm using
find_package( k4a REQUIRED CONFIG PATHS "C:/Azure-Kinect-Sensor-SDK/build/src/sdk" )

The error I get now is

CMake Error at C:/Azure-Kinect-Sensor-SDK/build/src/sdk/k4aConfig.cmake:7 (include):
1> [CMake]   include could not find load file:
1> [CMake] 
1> [CMake]     C:/Azure-Kinect-Sensor-SDK/build/src/sdk/k4aTargets.cmake

C:/Azure-Kinect-Sensor-SDK/build/src/sdk

It is source code directory. Probably, You have not build and install the library on your system yet.
It should usually be C:/Program Files/K4A/lib/cmake/k4a (or C:/Program Files (x86)/K4A/lib/cmake/k4a).
You need to learn about build and install libraries using CMake. Please build (ALL_BUILD project) and install (INSTALL project) of Azure Kinect Sensor SDK solution that generated by CMake.

Thanks so much for oyur help! After building, I had to run
ninja install
Then needed to delete my cmake cache.