"Fossies" - the Fresh Open Source Software Archive

Member "mariadb-connector-c-3.0.9-src/cmake/install.cmake" (8 Feb 2019, 4184 Bytes) of package /linux/misc/mariadb-connector-c-3.0.9-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "install.cmake": 3.0.8_vs_3.0.9.

    1 #
    2 #  Copyright (C) 2013-2016 MariaDB Corporation AB
    3 #
    4 #  Redistribution and use is allowed according to the terms of the New
    5 #  BSD license.
    6 #  For details see the COPYING-CMAKE-SCRIPTS file.
    7 #
    8 
    9 #
   10 # This file contains settings for the following layouts:
   11 #
   12 # - RPM
   13 # Built with default prefix=/usr
   14 #
   15 #
   16 # The following va+riables are used and can be overwritten
   17 # 
   18 # INSTALL_LAYOUT     installation layout (DEFAULT = standard for tar.gz and zip packages
   19 #                                         RPM packages
   20 #
   21 # INSTALL_BINDIR    location of binaries (mariadb_config)
   22 # INSTALL_LIBDIR    location of libraries
   23 # INSTALL_PLUGINDIR location of plugins
   24 
   25 IF(NOT INSTALL_LAYOUT)
   26   SET(INSTALL_LAYOUT "DEFAULT")
   27 ENDIF()
   28 
   29 SET(INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE
   30   STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), RPM and DEB")
   31 
   32 # On Windows we only provide zip and .msi. Latter one uses a different packager. 
   33 IF(UNIX)
   34   IF(INSTALL_LAYOUT MATCHES "RPM")
   35     SET(libmariadb_prefix "/usr")
   36   ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT|DEB")
   37     SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX})
   38   ENDIF()
   39 ENDIF()
   40 
   41 IF(CMAKE_DEFAULT_PREFIX_INITIALIZED_BY_DEFAULT)
   42   SET(CMAKE_DEFAULT_PREFIX ${libmariadb_prefix} CACHE PATH "Installation prefix" FORCE)
   43 ENDIF()
   44 
   45 # check if the specified installation layout is valid
   46 SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "DEB")
   47 LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" layout_no)
   48 IF(layout_no EQUAL -1)
   49   MESSAGE(FATAL_ERROR "Invalid installation layout ${INSTALL_LAYOUT}. Please specify one of the following layouts: ${VALID_INSTALL_LAYOUTS}")
   50 ENDIF()
   51 
   52 
   53 
   54 #
   55 # Todo: We don't generate man pages yet, will fix it
   56 #       later (webhelp to man transformation)
   57 #
   58 
   59 #
   60 # DEFAULT layout
   61 #
   62 
   63 SET(INSTALL_BINDIR_DEFAULT "bin")
   64 SET(INSTALL_LIBDIR_DEFAULT "lib/mariadb")
   65 SET(INSTALL_PCDIR_DEFAULT "lib/pkgconfig")
   66 SET(INSTALL_INCLUDEDIR_DEFAULT "include/mariadb")
   67 SET(INSTALL_DOCDIR_DEFAULT "docs")
   68 SET(INSTALL_PLUGINDIR_DEFAULT "lib/mariadb/plugin")
   69 SET(LIBMARIADB_STATIC_DEFAULT "mariadbclient")
   70 #
   71 # RPM layout
   72 #
   73 SET(INSTALL_BINDIR_RPM "bin")
   74 IF((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") AND CMAKE_SIZEOF_VOID_P EQUAL 8)
   75   SET(INSTALL_LIBDIR_RPM "lib64/mariadb")
   76   SET(INSTALL_PCDIR_RPM "lib64/pkgconfig")
   77   SET(INSTALL_PLUGINDIR_RPM "lib64/mariadb/plugin")
   78 ELSE()
   79   SET(INSTALL_LIBDIR_RPM "lib/mariadb")
   80   SET(INSTALL_PCDIR_RPM "lib/pkgconfig")
   81   SET(INSTALL_PLUGINDIR_RPM "lib/mariadb/plugin")
   82 ENDIF()
   83 SET(INSTALL_INCLUDEDIR_RPM "include")
   84 SET(INSTALL_DOCDIR_RPM "docs")
   85 SET(LIBMARIADB_STATIC_RPM "mariadbclient")
   86 
   87 #
   88 # DEB layout
   89 #
   90 SET(INSTALL_BINDIR_DEB "bin")
   91 SET(INSTALL_LIBDIR_DEB "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
   92 SET(INSTALL_PCDIR_DEB "lib/pkgconfig")
   93 IF(PLUGINDIR_DEB)
   94   SET(INSTALL_PLUGINDIR_DEB "${INSTALL_LIBDIR_DEB}/${PLUGINDIR_DEB}/plugin")
   95 ELSE()
   96   SET(INSTALL_PLUGINDIR_DEB "${INSTALL_LIBDIR_DEB}/mariadb/plugin")
   97 ENDIF()
   98 SET(INSTALL_INCLUDEDIR_DEB "include/mariadb")
   99 SET(LIBMARIADB_STATIC_DEB "mariadb")
  100 
  101 
  102 
  103 #
  104 # Overwrite defaults
  105 #
  106 IF(INSTALL_LIBDIR)
  107   SET(INSTALL_LIBDIR_${INSTALL_LAYOUT} ${INSTALL_LIBDIR})
  108 ENDIF()
  109 
  110 IF(INSTALL_PCDIR)
  111   SET(INSTALL_PCDIR_${INSTALL_LAYOUT} ${INSTALL_PCDIR})
  112 ENDIF()
  113 
  114 IF(INSTALL_PLUGINDIR)
  115   SET(INSTALL_PLUGINDIR_${INSTALL_LAYOUT} ${INSTALL_PLUGINDIR})
  116 ENDIF()
  117 
  118 IF(INSTALL_INCLUDEDIR)
  119   SET(INSTALL_INCLUDEDIR_${INSTALL_LAYOUT} ${INSTALL_INCLUDEDIR})
  120 ENDIF()
  121 
  122 IF(INSTALL_BINDIR)
  123   SET(INSTALL_BINDIR_${INSTALL_LAYOUT} ${INSTALL_BINDIR})
  124 ENDIF()
  125 
  126 IF(NOT INSTALL_PREFIXDIR)
  127   SET(INSTALL_PREFIXDIR_${INSTALL_LAYOUT} ${libmariadb_prefix})
  128 ELSE()
  129   SET(INSTALL_PREFIXDIR_${INSTALL_LAYOUT} ${INSTALL_PREFIXDIR})
  130 ENDIF()
  131 
  132 IF(DEFINED INSTALL_SUFFIXDIR)
  133   SET(INSTALL_SUFFIXDIR_${INSTALL_LAYOUT} ${INSTALL_SUFFIXDIR})
  134 ENDIF()
  135 
  136 FOREACH(dir "BIN" "LIB" "PC" "INCLUDE" "DOCS"  "PLUGIN")
  137   SET(INSTALL_${dir}DIR ${INSTALL_${dir}DIR_${INSTALL_LAYOUT}})
  138   MARK_AS_ADVANCED(INSTALL_${dir}DIR)
  139 ENDFOREACH()
  140 
  141 SET(LIBMARIADB_STATIC_NAME ${LIBMARIADB_STATIC_${INSTALL_LAYOUT}})
  142 MARK_AS_ADVANCED(LIBMARIADB_STATIC_NAME)