diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-01-02 10:48:20 +0100 |
---|---|---|
committer | Pavel Březina <pbrezina@redhat.com> | 2014-03-28 13:55:28 +0100 |
commit | d595f3c52fe99c122b3ec7da0023b563defda330 (patch) | |
tree | 2889746480a4765661559e7677be90895cc1ff47 /CMakeLists.txt | |
parent | 88b368705222e30fd1d721fa400472ebce9daa9a (diff) | |
download | openlmi_sssd-d595f3c52fe99c122b3ec7da0023b563defda330.tar.gz openlmi_sssd-d595f3c52fe99c122b3ec7da0023b563defda330.tar.xz openlmi_sssd-d595f3c52fe99c122b3ec7da0023b563defda330.zip |
Initial import
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c30909c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 2.6) +project(openlmi-sssd-provider C) + +# Version of the provider, needed by cim_registration() macro +set(OPENLMI_VERSION_MAJOR 0) +set(OPENLMI_VERSION_MINOR 1) +set(OPENLMI_VERSION_REVISION 0) +set(OPENLMI_VERSION "${OPENLMI_VERSION_MAJOR}.${OPENLMI_VERSION_MINOR}.${OPENLMI_VERSION_REVISION}") + +# Command for MOF registration +set(OPENLMI_MOF_REGISTER "openlmi-mof-register") + +# Where to lookup cmake modules +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) + +# Disallow in-source build +include(MacroEnsureOutOfSourceBuild) +macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.") + +# Set LIB_SUFFIX to 64 on 64bit architectures +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(LIB_SUFFIX "") +else(CMAKE_SIZEOF_VOID_P EQUAL 4) + SET(LIB_SUFFIX 64) +endif(CMAKE_SIZEOF_VOID_P EQUAL 4) + +# Set install locations +set(REG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/openlmi-providers") +set(MOF_INSTALL_DIR "${REG_INSTALL_DIR}") +if (DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "${LIB_INSTALL_DIR}/cmpi") +else (DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/cmpi") +endif (DEFINED LIB_INSTALL_DIR) + +# Prerequisites +include(OpenLMIMacros) +find_package(CMPI REQUIRED) +find_package(KonkretCMPI REQUIRED) + +# Add subdirectories +add_subdirectory(mof) +add_subdirectory(src) |