make-rules/cmake.mk
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Fri, 07 Apr 2017 17:56:36 -0700
changeset 7851 f82a18f72950
parent 7771 46912a8a1f29
permissions -rw-r--r--
Close of build 122.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     1
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     3
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     7
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    12
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    18
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    20
#
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    21
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    22
#
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    23
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    24
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    25
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    26
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    27
# This file sets up the default options and base requirements for GNOME
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    28
# components.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    29
#
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    30
# Most cmake-based components require intltools.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    31
include $(WS_MAKE_RULES)/intltool.mk
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    32
# cmake components don't generally use autoconf.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    33
include $(WS_MAKE_RULES)/justmake.mk
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    34
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    35
# Ensure correct version of libraries are linked to.
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    36
LDFLAGS += $(CC_BITS)
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    37
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    38
# This component uses cmake to generate Makefiles and so has no configure
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    39
CMAKE = $(shell which cmake)
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    40
CMAKE_BUILD_TYPE ?= RelWithDebInfo
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    41
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    42
# Layout configuration.
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    43
CMAKE_PREFIX ?= $(USRDIR)
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    44
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    45
CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER="$(CXX)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    46
CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS="$(CXXFLAGS)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    47
CMAKE_OPTIONS += -DCMAKE_C_COMPILER="$(CC)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    48
CMAKE_OPTIONS += -DCMAKE_C_FLAGS="$(CFLAGS)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    49
CMAKE_OPTIONS += -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)"
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    50
CMAKE_OPTIONS += -DCMAKE_AR="/usr/bin/ar"
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    51
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    52
# Must start install paths with a leading '/' or files will be installed into
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    53
# wrong location!
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    54
ifeq ($(strip $(PREFERRED_BITS)),64)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    55
CMAKE_BINDIR.32 ?=	$(CMAKE_PREFIX)/bin/$(MACH32)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    56
CMAKE_SBINDIR.32 ?=	$(CMAKE_PREFIX)/sbin/$(MACH32)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    57
CMAKE_EXECDIR.32 ?=	$(CMAKE_PREFIX)/lib/$(MACH32)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    58
CMAKE_BINDIR.64 ?=	$(CMAKE_PREFIX)/bin
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    59
CMAKE_SBINDIR.64 ?=	$(CMAKE_PREFIX)/sbin
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    60
CMAKE_EXECDIR.64 ?=	$(CMAKE_PREFIX)/lib
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    61
else
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    62
CMAKE_BINDIR.32 ?=	$(CMAKE_PREFIX)/bin
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    63
CMAKE_SBINDIR.32 ?=	$(CMAKE_PREFIX)/sbin
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    64
CMAKE_EXECDIR.32 ?=	$(CMAKE_PREFIX)/lib
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    65
CMAKE_BINDIR.64 ?=	$(CMAKE_PREFIX)/bin/$(MACH64)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    66
CMAKE_SBINDIR.64 ?=	$(CMAKE_PREFIX)/sbin/$(MACH64)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    67
CMAKE_EXECDIR.64 ?=	$(CMAKE_PREFIX)/lib/$(MACH64)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    68
endif
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    69
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    70
CMAKE_OPTIONS += -DCMAKE_MAKE_PROGRAM=$(GMAKE)
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    71
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    72
# Which variables to set to control installation location has changed over time
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    73
# for CMake, so cover all of the common ones.
5682
94c0ca64c022 15558602 TCL_LD_SEARCH_FLAGS is wrongly defined in tclConfig.sh
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 5597
diff changeset
    74
CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX="$(CMAKE_PREFIX)"
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    75
CMAKE_OPTIONS += -DCMAKE_MODULE_LINKER_FLAGS="$(LDFLAGS)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    76
CMAKE_OPTIONS += -DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    77
CMAKE_OPTIONS += -DGETTEXT_MSGFMT_EXECUTABLE="$(GNUBIN)/msgfmt"
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    78
CMAKE_OPTIONS += -DBIN_INSTALL_DIR="$(CMAKE_BINDIR.$(BITS))"
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    79
CMAKE_OPTIONS += -DEXEC_INSTALL_DIR="$(CMAKE_EXECDIR.$(BITS))"
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    80
CMAKE_OPTIONS += -DLIBEXEC_INSTALL_DIR="$(CMAKE_EXECDIR.$(BITS))"
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    81
CMAKE_OPTIONS += -DCMAKE_INSTALL_BINDIR="$(CMAKE_BINDIR.$(BITS))"
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    82
CMAKE_OPTIONS += -DCMAKE_INSTALL_LIBEXECDIR="$(CMAKE_EXECDIR.$(BITS))"
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    83
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    84
# Some components use LIB_INSTALL_DIR, as-is, others forcibly ignore it and set
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    85
# based on CMAKE_INSTALL_PREFIX.  Those usually instead offer a LIB_SUFFIX
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    86
# variable that we can generally use to accomplish the same result.  Setting
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    87
# them both shouldn't harm anything.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    88
CMAKE_OPTIONS += -DLIB_INSTALL_DIR="$(USRLIB)"
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    89
CMAKE_OPTIONS += -DCMAKE_INSTALL_LIBDIR="$(USRLIB)"
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    90
CMAKE_OPTIONS.64 += -DLIB_SUFFIX="/$(MACH64)"
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    91
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    92
# Required to ensure expected defines are set; also, ensures project's
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    93
# optimisation level set appropriately.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    94
CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    95
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    96
CMAKE_OPTIONS += $(CMAKE_OPTIONS.$(BITS))
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
    97
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    98
# Ensure cmake finds the matching 32/64-bit version of dependencies.
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
    99
COMPONENT_BUILD_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
   100
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   101
COMPONENT_PRE_BUILD_ACTION += cd $(@D);
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   102
COMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS);
7771
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
   103
COMPONENT_PRE_BUILD_ACTION += /usr/bin/env - $(COMPONENT_BUILD_ENV) \
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
   104
			      $(CMAKE) $(CMAKE_OPTIONS) \
46912a8a1f29 25639599 llvm makefile cleanup and optimized build
Shawn Walker-Salas <shawn.walker@oracle.com>
parents: 7527
diff changeset
   105
			      $(COMPONENT_DIR)/$(COMPONENT_SRC);
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   106
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   107
REQUIRED_PACKAGES += developer/build/cmake
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   108
REQUIRED_PACKAGES += developer/build/pkg-config
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   109
REQUIRED_PACKAGES += developer/gnu-binutils
7527
352b7a456c30 25305616 RE audits don't like the userland package anymore
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 5682
diff changeset
   110
REQUIRED_PACKAGES += developer/intltool
352b7a456c30 25305616 RE audits don't like the userland package anymore
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 5682
diff changeset
   111
REQUIRED_PACKAGES += library/gnome/gnome-common
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   112
REQUIRED_PACKAGES += system/library
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   113
REQUIRED_PACKAGES += system/linker
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   114
# Most cmake-based components expect GNU versions of these.
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   115
REQUIRED_PACKAGES += text/gawk
7527
352b7a456c30 25305616 RE audits don't like the userland package anymore
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 5682
diff changeset
   116
REQUIRED_PACKAGES += text/gnu-gettext
5125
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   117
REQUIRED_PACKAGES += text/gnu-grep
34cc580c62c2 21029732 PKG_CONFIG_PATH should be included in CONFIGURE_ENV and BUILD_ENV
Shawn Walker-Salas <shawn.walker@oracle.com>
parents:
diff changeset
   118
REQUIRED_PACKAGES += text/gnu-sed