How to Generate Makefile from Ccmake

How to Generate Makefile from Ccmake

I'm trying to install this library:

I cloned it into an xkin folder then I did the following:

cd xkin
mkdir build
cd build
ccmake ..

Then a terminal based GUI pops up that says EMPTY CACHE. So, I press c and it then configures and gives me this:

 CMAKE_BUILD_TYPE                 Debug                                                                                                                                                                                                      
 CMAKE_INSTALL_PREFIX             /usr/local                                                                                                                                                                                                 
 OpenCV_DIR                       /usr/share/OpenCV                                                                                                                                                                                          
 libfreenect_DIR                  /usr/local/share/libfreenect 

I dont know where to go from here. I've checked the build folder and bunch of files were created but none where I can do make.

Here's the CMakeLists.txt:

cmake_minimum_required( VERSION 2.6 )
project( XKin )

set( VERSION 1.0.0 )
set( PACKAGE_NAME ${CMAKE_PROJECT_NAME} )

set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR} )
find_package( OpenCV REQUIRED COMPONENTS core imgproc highgui )
find_package( fftw REQUIRED )
find_package( libfreenect REQUIRED )

set( CMAKE_BUILD_TYPE Debug )
set( CMAKE_C_FLAGS_DEBUG "-g" )
set( CMAKE_C_FLAGS_RELEASE "-O3" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )

configure_file( "${PROJECT_SOURCE_DIR}/config.h.in" 
            "${PROJECT_BINARY_DIR}/config.h" ) 

include_directories( "${PROJECT_BINARY_DIR}" )

add_subdirectory( lib )
add_subdirectory( tools )
add_subdirectory( demo )

Let me know if anything else is needed and I'll provide.

1 Answer

It seems once you configure the CMAKE_BUILD_TYPE to debug then press c a couple of times then pressing g generates the MakeFile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.