Difference between revisions of "OpenOffice CMake Integration"

From Apache OpenOffice Wiki
Jump to: navigation, search
(added categories)
Line 1: Line 1:
{{PageIgnoresWikiGuidelines}}
 
 
== Overview ==
 
== Overview ==
 
CMake is a cross-platform build system for build automation with support of popular programming languages including C++ and Java. Also, it could be used as a convenient configurator for existing build system.
 
CMake is a cross-platform build system for build automation with support of popular programming languages including C++ and Java. Also, it could be used as a convenient configurator for existing build system.

Revision as of 07:36, 5 June 2010

Overview

CMake is a cross-platform build system for build automation with support of popular programming languages including C++ and Java. Also, it could be used as a convenient configurator for existing build system.

Features

  • Automatically finds the next OOo SDK version on Unix platforms:
    • Official stable build of OOo SDK
    • Official development build of OOo SDK
    • Installation of OOo SDK, provided by Linux distribution (in most cases)
  • Automatically skips all OpenOffice.org installations without SDK, found in the system
  • Allows developer to override automatic choice of OOo SDK with custom path

After successful run module sets the next CMake variables:

  • OpenOffice_FOUND - System has OpenOffice.org with SDK (logical)
  • OpenOffice_VERSION - Version of OpenOffice.org with SDK
  • OOO_PREFIX - Prefix of OpenOffice.org installation
  • OOO_BASIS_DIR - "basis" directory of OpenOffice.org
  • OOO_PROGRAM_DIR - "program" directory of OpenOffice.org
  • OOO_URE_DIR - "ure" directory of OpenOffice.org
  • OOO_SDK_DIR - "sdk" directory of OpenOffice.org
  • OOO_INCLUDE_DIR - include directory of OpenOffice.org
  • UNOPKG_EXECUTABLE - Absolute path of unopkg tool

CMake module "FindOpenOffice" can be downloaded here:

File:FindOpenOffice.cmake.gz

Finding OpenOffice.org SDK

To use it, download this file, uncompress it, copy into your project directory (it's traditional to use subdirectory cmake/modules/ for this purpose), and add line

find_package(OpenOffice)

into your CMakeLists.txt. It's needed to set variable CMAKE_MODULE_PATH in the beginning of project, see example below. If OpenOffice.org SDK is mandatory for building of your project, use

find_package(OpenOffice REQUIRED)

to stop configuration process if OpenOffice.org SDK was not found.

Personal tools