實例一:spa
main.c3d
#include <stdio.h> int main( int argc, char *argv[] ) { printf("hello cmake!\n"); return 0; }
CMakeLists.txtcode
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(HELLO) SET(SRC_LIST main.c) ADD_EXECUTABLE(main ${SRC_LIST})
按照下圖依次進行操做便可blog