In this tutorial, we will simply create a new project
Navigate to your worktree and type:
$ qibuild create foo
Remember, for this to work on windows, you should have:
This will create a new project in QI_WORK_TREE/foo
Let us have a look at what has been generated:
foo
|__ qiproject.xml
|__ CMakeLists.txt
|__ main.cpp
|__ test.cpp
If you already have source code somewhere, all you have to do is to:
create a qiproject.xml looking like
<project name="foo" />
(optional, if you want to use qi_ functions...): include find_package(qibuild) somewhere after the call to project()
You can do this by running
$ qibuild convert
Note
‘qibuild convert’ will check that your root CMakeLists.txt is correct, please read the messages carefully
In any case, the root CMakeLists.txt should look like:
cmake_minimum_required(VERSION 2.8)
project(my_project)
find_package(qibuild)
The project() call is mandatory for qibuild to work when using Visual Studio, the find_package(qibuild) call must be right after project(), otherwise you can have trouble when using a toolchain file.