Difference: BuildingGPSTkUnderOSX (r14 vs. r13)

Building and Installing in a UNIX-like Environment using the GPSTk script - Terminal

The following procedure will build and install the GPSTk under the following environments.

OS X Developer Tools under Mavericks (10.9.5)

The following procedure will build and install the GPSTk.

  1. Ensure that prerequisites such as CMake have been installed.
  2. Download the GPSTk source distribution.
  3. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  4. Navigate to the root GPSTk directory
  5. Run the GPSTk script with the desired parameters
    Build and Install using default paths
    $ ./script_gpstk.sh ./build.sh [-h] [-cpdbiotv] [-l [-cdeusxtpv] [-b ] [-r [-i ] [-s [-j ] [-P ] 
    -h help Display Show this message help message. 

    -c build_cpp -b Specify the cmake build C++ files and directory to use. libraries
    -d build_doxygen build Doxygen files (used for python docstrings)
    -p build_python -i Install the build Python files and libraries to the given path. with SWIG bindings
    -e build_sphinx build Sphinx RST files into HTML documentation
    -j Number of threads to have make use. Defauts to $num_threads on host
    -b clean_build rm -rf gpstk_root/build; rm -rf python_root/build
    -i clean_install rm -rf gpstk_install; rm -rf python_install -c Clean out any files in the build dir prior to running cmake.

    -o core_only only builds core library code -d Build documentation, including generate dependency graphs
    -t test_switch initialize test framework using GraphViz (.DOT and .PDF files).
    -v graphviz generate dependency graph (.DOT and .PDF files)
    -e GPSTk has several parts: core, ext, and python/swig bindings.
    -r gpstk_root default = See README.txt for details. $gpstk_root, path to GPSTk dev top-level CMakeLists.txt file (and source tree)
    -s gpstk_install default = $gpstk_install, GPSTk install Default (without -e) will build only core path prefix, to contain ./bin, ./lib, and ./include.
    -l python_install default = $python_install, Python bindings package install Optional (with -e) will build core, ext, and swig path prefix

    -u Install the build to the path in the \$gpstk environment variable.
    If this variable is not set, it will be installed to
    $user_install_prefix.

    -s Install the build into $system_install_prefix and the python
    bindings to the default system location. Make sure the build path
    is writable by root.

    -x Disable building the python bindings. Default is to build them
    if -e is specified.

    -P Python executable used to help determine with python system libraries
    will be used when building python extension package.
    Default=$python_exe

    -t Build and run tests.

    -p Build supported packages (source, binary, deb, ...)

    -v Include debugging output.

    Notes:
    Remember to add user and non-standard locations to your environment. Eg:
    $ export LD_LIBRARY_PATH=/tmp/test/gpstk/lib:\$LD_LIBRARY_PATH
    $ export PYTHONPATH=/tmp/test/lib/python2.7/site-packages:\$PYTHONPATH

Building and Installing in OSX using CMake - Terminal

The following procedure will build and install the GPSTk, under the following environments:

OS X Developer Tools under Mavericks (10.9.5)
  1. Ensure that OS X Developer Tools and CMake have been installed.
  2. Download the GPSTk source distribution.
  3. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  4. Create a directory for your build. For example, change into the gpstk/directory and type
    mkdir build
  5. Change into the gpstk/buildgpstk/build directory, this will be where all of the build files will reside.
  6. If GPSTk Core will be installed as a system library in /usr/local/usr/local, execute the following commands:
    cmake ../ or ../dev (if using Developer repo) 
    make
    To install to a different directory, the install directory must be set-up when CMake configures the makefiles. Execute makefiles, add the following commands: command:
    cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install ../ or ../dev (if using Developer repo) 
    make
    To build GPSTk with Ext, in addition to Core, add the following command:
    -DBUILD_EXT=ON
    To turn on processing of python extension package, add the following command:
     -DBUILD_PYTHON=ON
    To turn on test mode, add the following command:
     -DTEST_SWITCH=ON 
    Example - Command for building GPSTk with core, ext, python, and test code and installing to sytem library in /usr/local:
     cmake -DBUILD_EXT=ON -DBUILD_PYTHON=ON -DTEST_SWITCH=ON ../ 
    make
  7. To test GPSTk (if Test_Switch=ON), execute
    make test
  8. To install GPSTk, execute
    make install
  9. To build the source documentation using doxygen: Change into the gpstk/devgpstk/dev directory (if using Developer repo) or the gpstk/directory (if using the tarball), and type
    doxygen 

Building and Installing in OSX using CMake - Xcode IDE

The following procedure will build and install the GPSTk, under the following environments:

XCode 5.1.1 IDE under under Mavericks (10.9.5)
  1. Ensure that OS X Developer Tools and CMake have been installed.
  2. Download the GPSTk source distribution.
  3. Extract the GPSTk tarball. For example, using GNU tar
    tar xvzf gpstk.tar.gz
  4. Open a Terminal window in which to build the Xcode Project file using CMake.
  5. Create a directory for your build. For example, change into the gpstk/directory and type
    mkdir build_Xcode
  6. Change into the gpstk/build directory, this will be where all of the build and project files will reside.
  7. If GPSTk will be installed as a system application in /usr/local, only the CMake generator must be declared when building the project files:
    • Execute the following commands:
      cmake -G "Xcode" ../ or ../dev (if using Developer repo)
      make
  8. If GPSTk will be installed to a custom directory, the target installation directory and CMake generator must be declared when building the project files:
    • Execute the following commands:
      cmake -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install -G "Xcode" ../ or ../dev (if using Developer repo)
      make
  9. Once CMake is finished, open XCode IDE
  10. Left-click on "Open Other..." button at bottom left of "Welcome to Xcode" window
    %IMGLNK{"open.png"}%
  11. In the File Explorer, navigate to the build folder and choose the Xcode project file, gpstk.xcodeproj.
    %IMGLNK{"project.png"}%
  12. Wait until Xcode has completely loaded the project and finished indexing files.
  13. In the top left portion of the IDE, click on "ALL_BUILD" and the various projects that make up the GPSTk can be seen ("ALL_BUILD", which will build all projects except for "install").
    %IMGLNK{"build1.png"}%

    %IMGLNK{"build2.png"}%
  14. In the top left portion of the IDE, click on "My Mac 64-bit" to choose between 32-bit or 64-bit build architecture.
    %IMGLNK{"build3.png"}%
  15. To Build the GPSTk, select the "ALL_BUILD" project, the desired build architecture, and click on the Run button at the top left of the IDE.
    %IMGLNK{"run.png"}%
  16. Once Xcode has finished building the code, verify that all projects were built and no errors occurred (should match the below image).
    %IMGLNK{"buildcomplete.png"}%
  17. To Install the GPSTK, select the "install" project, the desired build architecture, and click on the Run button at the top left of the IDE.
    %IMGLNK{"install.png"}%
  18. Once Xcode has finished installing the binaries, verify no errors occurred (should match the below image).
    %IMGLNK{"installcomplete.png"}%
  19. To verify that the applications are working, open a Terminal window, navigate to the target installation folder, and run an application (timeconvert.exe in image below)
    %IMGLNK{"verification.png"}%

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback