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)