-
Notifications
You must be signed in to change notification settings - Fork 3
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.
Compiling Bump on Mac OS X is easy using CMake (make sure you have it installed).
- 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
- Launch the CMake-Gui
- Set the "Where is the source code:" to $BUMP_HOME
- Set the "Where to build the binaries:" to $BUMP_HOME/build.macosx
- Hit the Configure button
- Select Xcode and native default compilers
- Check both the Grouped and Advanced options
- 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
- Hit Generate button
- Go the the directory $BUMP_HOME/build.macosx
- Open up the Bump.xcodeproj with Xcode
- 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)
- Switch the build to "install" with the dropdown target at the top left
- Build (which will compile all libs, tests and examples and install)
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.
- 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
- Launch the CMake-Gui
- Set the "Where is the source code:" to $BUMP_HOME
- Set the "Where to build the binaries:" to $BUMP_HOME/build.ios7
- Hit the Configure button
- Select Xcode and native default compilers
- Check both the Grouped and Advanced options
- 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
- Hit Generate button
- Go the the directory $BUMP_HOME/build.ios7
- Open up the Bump.xcodeproj with Xcode
- Go to the Project Settings
- Select the bump library target
- Set Architectures to "Standard architectures (armv7, armv7s)"
- Set Base SDK to "Latest iOS (iOS 7.0)"
- Set Build Active Architecture Only to "No"
- Set Valid Architectures to "armv7 armv7s"
- Set C++ Language Dialect to "GNU++11 [-std=gnu++11]"
- Set C++ Standard Library to "libc++ (LLVM C++ standard library with C++11 support)"
- Make sure the Other C++ Flags is set to what you expect
- Select the install target
- Set Architectures to "Standard architectures (armv7, armv7s)"
- Set Base SDK to "Latest iOS (iOS 7.0)"
- Set Build Active Architecture Only to "No"
- Set Valid Architectures to "armv7 armv7s"
- Switch the build to "install" with the dropdown target at the top left
- 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.
Compiling Bump on Windows is easy with CMake (make sure you have it installed).
- 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
- Launch the CMake-Gui
- Set the "Where is the source code:" to $BUMP_HOME
- Set the "Where to build the binaries:" to $BUMP_HOME\build.win32
- Hit the Configure button
- Select "Visual Studio 2008 9" and native default compilers
- Check both the Grouped and Advanced options
- 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
- Hit Generate button
- Go the the directory $BUMP_HOME\build.win32
- Open up the ALL_BUILD.vcproj with Visual Studio
- 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
- Right-click on the "install" target and select Build (compiles all libs, tests and examples and installs)
Compiling Bump on Linux is easy with CMake (make sure you have it installed).
- 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
- Launch the CMake-Gui
- Set the "Where is the source code:" to $BUMP_HOME
- Set the "Where to build the binaries:" to $BUMP_HOME/build.linux64
- Hit the Configure button
- Select "Unix Makefiles" and native default compilers
- 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
- Hit Generate button
- Go the the directory $BUMP_HOME/build.linux64
- If you want to build the documentation, type "make Documentation_bump"
- Runs Doxygen on the doxyfile that is generated for Bump
- make -j 8 install (compiles the libs, unittests and examples and installs them all)
- Run the same steps for Debug by creating a build.linux64-debug directory