OpenOffice CMake Integration

From Apache OpenOffice Wiki
Revision as of 07:17, 5 June 2010 by Annulen (Talk | contribs)

Jump to: navigation, search
Documentation caution.png

This page ignores the Wiki Contribution Guidelines. New pages should not do that. Please read the Guidelines and fix the page. At least:

  • use categories
  • provide links between pages so that your page is neither orphaned nor a dead-end page.
  • keep drafts on your userpage
  • see Help:Translating for nonenglish content

Please note that it is possible that pages that are not following the guidelines will be deleted to avoid confusion.

Feel free to remove this warning from the page when you have fixed it. (However, when the page is fixed this warning will be removed soon anyway).

For more information just ask the people of the project:


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.


  • 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 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 with SDK (logical)
  • OpenOffice_VERSION - Version of with SDK
  • OOO_PREFIX - Prefix of installation
  • OOO_BASIS_DIR - "basis" directory of
  • OOO_PROGRAM_DIR - "program" directory of
  • OOO_URE_DIR - "ure" directory of
  • OOO_SDK_DIR - "sdk" directory of
  • OOO_INCLUDE_DIR - include directory of
  • UNOPKG_EXECUTABLE - Absolute path of unopkg tool

CMake module "FindOpenOffice" can be downloaded here:


Finding 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


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

find_package(OpenOffice REQUIRED)

to stop configuration process if SDK was not found.

Personal tools