Skip to content

Compiling Bump

Christian Noon edited this page Sep 20, 2013 · 6 revisions

Compiling Bump is really straight forward with CMake. Just follow the step-by-step instructions for your operating system.

Mac OS X

Compiling Bump on Mac OS X is easy using CMake (make sure you have it installed).

  1. First fork it on github or download the latest release to what we'll refer to as $BUMP_HOME
  • A good example of $BUMP_HOME is /Users/username/Programming/Libraries/bump-1.0.0-src
  1. Launch the CMake-Gui
  2. Set the "Where is the source code:" to $BUMP_HOME
  3. Set the "Where to build the binaries:" to $BUMP_HOME/build.macosx
  4. Hit the Configure button
  5. Select Xcode and native default compilers
  6. Check both the Grouped and Advanced options
  7. After configuring, set the following properties in all the groups
Boost
    - Boost_DIR - set this
    - Boost_INCLUDE_DIR - set this
    - Boost_LIBRARY_DIRS - set this
        - When setting all these, CMake should pick up the rest of the paths, if not, you have to fill them out by hand
Bump
    - Bump_BUILD_DOCUMENTATION - optional (check only if you want to build the docs)
    - Bump_BUILD_EXAMPLES - checked
    - Bump_BUILD_TESTS - optional (check only if you want to build the unittests)
    - Bump_INSTALL_NAME_DIR - leave the default
Bump - For Shared (*.dylib)
    - Bump_COMPILE_FRAMEWORKS - unchecked
    - Bump_DYNAMIC_LINKING - checked
Bump - For Shared (*.framework)
    - Bump_COMPILE_FRAMEWORKS - checked
    - Bump_DYNAMIC_LINKING - checked
Bump - For Static (*.a)
    - Bump_COMPILE_FRAMEWORKS - unchecked
    - Bump_DYNAMIC_LINKING - unchecked
CMAKE
    - CMAKE_BUILD_TYPE = "Debug;Release" (If you are building a .framework, you can only build one at a time)
    - CMAKE_CONFIGURATION_TYPES - Debug;Release (If you are building a .framework, you can only build one at a time)
    - CMAKE_INSTALL_PREFIX - $INSTALL_HOME (/Users/username/Programming/Libraries/bump-1.0.0)
GTest
    - GTEST_INCLUDE_DIR = $GTEST_HOME/include
    - GTEST_LIBRARY = $GTEST_HOME/lib/libgtest.a
    - GTEST_LIBRARY_DEBUG = $GTEST_HOME/lib/libgtestd.a
    - GTEST_MAIN_LIBRARY = $GTEST_HOME/lib/libgtest_main.a
    - GTEST_MAIN_LIBRARY_DEBUG = $GTEST_HOME/lib/libgtest_maind.a
  1. Hit Generate button
  2. Go the the directory $BUMP_HOME/build.macosx
  3. Open up the Bump.xcodeproj with Xcode
  4. If you want to build the documentation, select the "Documentation - Bump" dropdown target at the top left
  • Go ahead and build (runs Doxygen on the doxyfile that is generated for Bump)
  1. Switch the build to "install" with the dropdown target at the top left
  2. Build (which will compile all libs, tests and examples and install)

iOS 7

Compiling Bump on iOS is pretty easy using CMake (make sure you have it installed). You also already have to have compiled the Boost libraries as static libs against the arm architecture to proceed. If you haven't, refer to the Compiling Boost wiki page.

Downloading the source

  1. First fork it on github or download the latest release to what we'll refer to as $BUMP_HOME
  • A good example of $BUMP_HOME is /Users/username/Programming/Libraries/bump-1.2.0-src

Static Device Libs

  1. Launch the CMake-Gui
  2. Set the "Where is the source code:" to $BUMP_HOME
  3. Set the "Where to build the binaries:" to $BUMP_HOME/build.ios7
  4. Hit the Configure button
  5. Select Xcode and native default compilers
  6. Check both the Grouped and Advanced options
  7. After configuring, set the following properties in all the groups
Boost
    - Boost_DIR - set this
    - Boost_INCLUDE_DIR - set this
    - Boost_LIBRARY_DIRS - set this
        - When setting all these, CMake should pick up the rest of the paths, if not, you have to fill them out by hand
Bump
    - Bump_BUILD_DOCUMENTATION - unchecked
    - Bump_BUILD_EXAMPLES - unchecked
    - Bump_BUILD_TESTS - unchecked
    - Bump_COMPILE_FRAMEWORKS - unchecked
    - Bump_DYNAMIC_LINKING - unchecked
    - Bump_INSTALL_NAME_DIR - leave the default
CMAKE
    - CMAKE_BUILD_TYPE = "Release"
    - CMAKE_CONFIGURATION_TYPES - Release
    - CMAKE_CXX_FLAGS - "-mthumb -fvisibility=hidden -fvisibility-inlines-hidden -stdlib=libc++ -std=gnu++11 -miphoneos-version-min=7.0"
    - CMAKE_INSTALL_PREFIX - $INSTALL_HOME (/Users/username/Programming/Libraries/bump-1.2.0)
    - CMAKE_OSX_ARCHITECTURES - armv7;armv7s
    - CMAKE_OSX_SYSROOT - /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk
GTest
    - Just leave all the defaults because we're not building the tests
  1. Hit Generate button
  2. Go the the directory $BUMP_HOME/build.ios7
  3. Open up the Bump.xcodeproj with Xcode
  4. Go to the Project Settings
  5. Select the bump library target
  6. Set Architectures to "Standard architectures (armv7, armv7s)"
  7. Set Base SDK to "Latest iOS (iOS 7.0)"
  8. Set Build Active Architecture Only to "No"
  9. Set Valid Architectures to "armv7 armv7s"
  10. Set C++ Language Dialect to "GNU++11 [-std=gnu++11]"
  11. Set C++ Standard Library to "libc++ (LLVM C++ standard library with C++11 support)"
  12. Make sure the Other C++ Flags is set to what you expect
  13. Select the install target
  14. Set Architectures to "Standard architectures (armv7, armv7s)"
  15. Set Base SDK to "Latest iOS (iOS 7.0)"
  16. Set Build Active Architecture Only to "No"
  17. Set Valid Architectures to "armv7 armv7s"
  18. Switch the build to "install" with the dropdown target at the top left
  19. Build (which will compile the lib and install the headers)
  • NOTE: You may have to copy the lib folder...this is probably a bug that needs to be fixed in the build system.

Windows

Compiling Bump on Windows is easy with CMake (make sure you have it installed).

  1. First fork it on github or download the latest release to what we'll refer to as $BUMP_HOME
  • A good example of $BUMP_HOME is C:\libraries\bump-1.0.0-src
  1. Launch the CMake-Gui
  2. Set the "Where is the source code:" to $BUMP_HOME
  3. Set the "Where to build the binaries:" to $BUMP_HOME\build.win32
  4. Hit the Configure button
  5. Select "Visual Studio 2008 9" and native default compilers
  6. Check both the Grouped and Advanced options
  7. After configuring, set the following properties in all the groups
Boost
    - Boost_DIR = $BOOST_HOME
    - Boost_INCLUDE_DIR = $BOOST_HOME\include
        - All the other paths should be dynamically generated when you hit the "Configure" button
Bump
    - Bump_BUILD_DOCUMENTATION - optional (check only if you want to build the docs)
    - Bump_BUILD_EXAMPLES - checked
    - Bump_BUILD_TESTS - optional (check only if you want to build the unittests)
    - Bump_WIN32_USE_MP - checked (enables multi-core processing in Visual Studio)
Bump - For Shared (*.libs and *.dlls)
    - Bump_DYNAMIC_LINKING - checked
Bump - For Static (*.libs)
    - Bump_DYNAMIC_LINKING - unchecked
CMAKE
    - CMAKE_BUILD_TYPE = "Debug;Release"
    - CMAKE_INSTALL_PREFIX = $INSTALL_HOME (C:\libraries\bump-1.0.0)
GTest
    - GTEST_INCLUDE_DIR = $GTEST_HOME\include
    - GTEST_LIBRARY = $GTEST_HOME\lib\gtest.lib
    - GTEST_LIBRARY_DEBUG = $GTEST_HOME\lib\gtestd.lib
    - GTEST_MAIN_LIBRARY = $GTEST_HOME\lib\gtest_main.lib
    - GTEST_MAIN_LIBRARY_DEBUG = $GTEST_HOME\lib\gtest_maind.lib
  1. Hit Generate button
  2. Go the the directory $BUMP_HOME\build.win32
  3. Open up the ALL_BUILD.vcproj with Visual Studio
  4. If you want to build the documentation, right-click on the "Documentation - Bump" project and select Build
  • Runs Doxygen on the doxyfile that is generated for Bump
  1. Right-click on the "install" target and select Build (compiles all libs, tests and examples and installs)

Linux

Compiling Bump on Linux is easy with CMake (make sure you have it installed).

  1. First fork it on github or download the latest release to what we'll refer to as $BUMP_HOME
  • A good example of $BUMP_HOME is /home/username/Programming/Libraries/bump-1.0.0-src
  1. Launch the CMake-Gui
  2. Set the "Where is the source code:" to $BUMP_HOME
  3. Set the "Where to build the binaries:" to $BUMP_HOME/build.linux64
  4. Hit the Configure button
  5. Select "Unix Makefiles" and native default compilers
  6. Check both the Grouped and Advanced options After configuring, set the following properties in all the groups
Boost
    - Boost_INCLUDE_DIR = $BOOST_HOME/include
    - Boost_LIBRARY_DIRS = $BOOST_HOME/lib
        - Set the all the library paths as they're all required
        - You'll probably still have to fix some of the library paths
Bump
    - Bump_BUILD_DOCUMENTATION - optional (check only if you want to build the docs)
    - Bump_BUILD_EXAMPLES - checked
    - Bump_BUILD_TESTS - optional (check only if you want to build the unittests)
Bump - For Shared (*.so)
    - Bump_DYNAMIC_LINKING - checked
Bump - For Static (*.a)
    - Bump_DYNAMIC_LINKING - unchecked
CMAKE
    - CMAKE_BUILD_TYPE = "Release"
    - CMAKE_INSTALL_PREFIX = $INSTALL_HOME (/Users/username/Programming/Libraries/bump-1.0.0-release)
GTest
    - GTEST_INCLUDE_DIR = $GTEST_HOME/include
    - GTEST_LIBRARY = $GTEST_HOME/lib/libgtest.a
    - GTEST_LIBRARY_DEBUG = $GTEST_HOME/lib/libgtestd.a
    - GTEST_MAIN_LIBRARY = $GTEST_HOME/lib/libgtest_main.a
    - GTEST_MAIN_LIBRARY_DEBUG = $GTEST_HOME/lib/libgtest_maind.a
  1. Hit Generate button
  2. Go the the directory $BUMP_HOME/build.linux64
  3. If you want to build the documentation, type "make Documentation_bump"
  • Runs Doxygen on the doxyfile that is generated for Bump
  1. make -j 8 install (compiles the libs, unittests and examples and installs them all)
  2. Run the same steps for Debug by creating a build.linux64-debug directory
Clone this wiki locally