Image processing library in C++
CMake (cross-platform)


The first step is to generate a project file, as a makefile or Microsoft Visual Studio project with solution files. So, you download/install CMake http://www.cmake.org/cmake/resources/software.html (for debian/ubuntu sudo apt-get install cmake cmake-qt-gui). Then, you execute cmake-gui where

Now, you can execute the program defined in the main.cpp. If you success, you can start to code in the main.cpp file.

Shared library

Also, you can include Population as shared library. The first step is to compile Population to generate the shared library.

BUILD_SHARED_LIBS is quoted in cmake-gui

Then, you create a cmake project with a main.cpp file with this following code in your CMakeLists.txt.

cmake_minimum_required(VERSION 2.6)
list(APPEND CMAKE_MODULE_PATH "/home/tariel/Desktop/DEV2/Population-build")#replace this path by yours
find_package(Population REQUIRED)
add_executable( test_project main.cpp)
target_link_libraries(test_project ${POPULATION_LIBRARY})

In your main file, for instance this simple code

using namespace pop;//Population namespace
int main(){
Mat2F64 m(2,2);// a 2d matrix with two rows and two columns

That's all for CMake.

Activate modules

Of course, you can activate third party modules by quoting the variable in cmake-gui (for vlc WITH_VLC for instance).