I need to convert Qt Project to CMake , as i want to integrate it with other projects which are already in CMake .
The Qt .Pro file is as follows ,
TEMPLATE = app
INCLUDEPATH += ./lib
# Input
HEADERS += dollar/GestureTemplate.h \
dollar/PathWriter.h \
dollar/GeometricRecognizerTypes.h \
dollar/GeometricRecognizer.h \
dollar/SampleGestures.h \
lib/GestureTemplate.h \
lib/PathWriter.h \
lib/GeometricRecognizerTypes.h \
lib/GeometricRecognizer.h \
lib/SampleGestures.h \
lib/MultiStrokeGestureTemplate .h \
lib/MultiStrokeGestureTemplate .h \
lib/MultiStrokeGestureTemplate .h \
lib/MultiStrokeGestureTemplate .h \
lib/SampleMultiStrokeGestures.h \
lib/MultipleStrokeGestureTemplate.h \
lib/utils.h
SOURCES += main.cpp \
lib/GeometricRecognizer.cpp
LIBS += -L/usr/lib \
-lml \
There is only one directory Lib and in the main path there is main.cpp , all the other files are inside Lib directory .
I don’t know much about cmake i have come up with the following cmake list for the above qt project.
cmake_minimum_required (VERSION 2.6)
Project(dollar)
INCLUDE_DIRECTORIES("lib")
# Make Executable
ADD_EXECUTABLE(main main.cpp)
# Link the executable to the Hello library.
TARGET_LINK_LIBRARIES(main -lml -L/usr/lib)
cmake succeeds but after that make gives me many errors ,see the error log -> http://www.text-upload.com/read,4022366863337 .What all additions i require to make in CMake List ?.
It seems that you have missed lib/GeometricRecognizer.cpp file