{ "info": { "author": "Manuel Guenther", "author_email": "manuel.guenther@idiap.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Bob", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": ".. vim: set fileencoding=utf-8 :\n.. Manuel Gunther \n.. Wed May 25 10:55:42 MDT 2016\n\n.. image:: http://travis-ci.org/bioidiap/bob.example.cmake.svg?branch=v1.0.1\n :target: https://travis-ci.org/bioidiap/bob.example.cmake?branch=v1.0.1\n.. image:: https://img.shields.io/badge/github-master-0000c0.png\n :target: https://github.com/bioidiap/bob.example.cmake/tree/master\n\n===========================================\n Example project using Bob's C++ interface\n===========================================\n\nThis example project shows a way to incorporate Bob's C++ libraries into a C++ project.\nFor this, is uses the CMake_ interface, and a home-developed ``FindBob.cmake`` file.\nIt relies on the python interface to download and install Bob_.\nMore information about the Bob installation can be found on its `webpage `_.\n\nThis package is licensed under a BSD-3 license with a copyright of the Regents of the University of Colorado on behalf of the University of Colorado Colorado Springs.\nPlease see LICENSE file for details.\n\nBuilding this example\n---------------------\n\nAs the example requires some Bob_ packages to be installed, we first run one of the ways to install Bob_, i.e., using `buildout `_.\nFor that, simply go to the main directory of this package and call::\n\n $ python bootstrap-buildout.py\n $ ./bin/buildout\n\nThis will checkout some of the packages to the ``src`` directory, and download some into the ``eggs`` directory.\nIf you have Bob installed globally, it will use the globally installed packages instead of downloading new eggs.\nIf you have Bob installed in a non-default directory, for example in an `virtual environment `_, you can use that python version to bootstrap.\n\nInside of this package I have prepared a small CMake_ project that includes some of the Bob_ packages.\nIt uses the ``FindBob.cmake`` to locate Bob's include directories and libraries.\nTo enable that, you can use the ``find_package(Bob COMPONENTS REQUIRED)`` command to find the list of bob ``package(s)``.\nLater, you can use three CMake_ variables ``Bob_INCLUDE_DIRS``, ``Bob_LIBRARY_DIRS``, ``Bob_LIBRARIES`` and ``Bob_DEFINITIONS`` and add it to your project::\n\n cmake_minimum_required(VERSION 2.8)\n project(test)\n\n # Set the module path so that \"FindBob.cmake\" is found\n set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})\n\n # Find all Bob packages recursively\n find_package(Bob COMPONENTS bob.io.image REQUIRED)\n\n # Add Bob's include directories\n include_directories(${Bob_INCLUDE_DIRS})\n # Add Bob's library directories\n link_directories(${Bob_LIBRARY_DIRS})\n # Add Bob's libraries\n link_libraries(${Bob_LIBRARIES} boost_system)\n # Add Bob's definitions\n add_definitions(${Bob_DEFINITIONS})\n\n # create an \"my_test\" executable from file \"test.cpp\"\n add_executable(my_test test.cpp)\n\nFor some reason (that I do not understand) we also need to add the ``boost_system`` library, although it should theoretically be linked to the Bob_ libraries already.\n\nSo, now we can go ahead and compile our package using CMake_::\n\n $ mkdir build\n $ cd build\n $ cmake ..\n $ make\n\nand we should get an executable ``my_test`` inside the build directory.\nNote that you can pass a variable to CMake to use a custom Bob_ installation::\n\n $ cmake .. -DBOB_PREFIX_PATH=/path/to/your/bob/installation\n\nor set the ``BOB_PREFIX_PATH`` environment variable accordingly.\nIf you have a local directory containing (some of) the Bob packages inside ``src`` or ``eggs`` sub-directories, you can set the ``BOB_SOURCE_DIR`` variable, which defaults to the directory where the ``CMakeLists.txt`` is located::\n\n $ cmake .. -DBOB_SOURCE_DIR=/path/to/your/local/bob/packages\n\nThe evaluation order of the directories is:\n\n1. ``${BOB_SOURCE_DIR}/src``\n2. ``${BOB_SOURCE_DIR}/eggs``\n3. ``${BOB_PREFIX_PATH}/lib/*/site-packages`` (where * typically is your python version)\n4. the system path\n\nTo run the example, go back to the package base directory (otherwise it will not find the example image) and call::\n\n $ ./build/my_test\n\nThis should create an HDF5 file called ``test.hdf5`` inside the current directory.\n\n\n.. _cmake: http://cmake.org\n.. _bob: http://www.idiap.ch/software/bob", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bioidiap/bob.example.cmake", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "bob.example.cmake", "package_url": "https://pypi.org/project/bob.example.cmake/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bob.example.cmake/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bioidiap/bob.example.cmake" }, "release_url": "https://pypi.org/project/bob.example.cmake/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Example project using Bob C++ interface", "version": "1.0.1" }, "last_serial": 2355313, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1cfc5a1a343e22f8560b3de3a976b906", "sha256": "52ec2e2bc540321031f94e128229adfb7da40c4dd1510cc24a779badcf7b1d80" }, "downloads": -1, "filename": "bob.example.cmake-1.0.0.zip", "has_sig": false, "md5_digest": "1cfc5a1a343e22f8560b3de3a976b906", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10028, "upload_time": "2016-06-06T05:43:33", "url": "https://files.pythonhosted.org/packages/18/e1/d05e4e8152ef4aec70bc79562f6f4b4477a522e0fe35ebc6c35fbfe8ff74/bob.example.cmake-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "23b63c197f2d91a3a5e35fd5fe1fc002", "sha256": "f4e7580bebc0bfdc60a57d30cee4d5e1592bd43fed2a0c2c3aa22fc4878e03b5" }, "downloads": -1, "filename": "bob.example.cmake-1.0.1.zip", "has_sig": false, "md5_digest": "23b63c197f2d91a3a5e35fd5fe1fc002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 539110, "upload_time": "2016-06-06T05:51:26", "url": "https://files.pythonhosted.org/packages/69/b2/3227d9855340ad7164a89ea99ea58f0862229ce526f01cc505729ac2f5dd/bob.example.cmake-1.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "23b63c197f2d91a3a5e35fd5fe1fc002", "sha256": "f4e7580bebc0bfdc60a57d30cee4d5e1592bd43fed2a0c2c3aa22fc4878e03b5" }, "downloads": -1, "filename": "bob.example.cmake-1.0.1.zip", "has_sig": false, "md5_digest": "23b63c197f2d91a3a5e35fd5fe1fc002", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 539110, "upload_time": "2016-06-06T05:51:26", "url": "https://files.pythonhosted.org/packages/69/b2/3227d9855340ad7164a89ea99ea58f0862229ce526f01cc505729ac2f5dd/bob.example.cmake-1.0.1.zip" } ] }