author | Matt Plumtree <matt.plumtree@nokia.com> |
Fri, 12 Nov 2010 17:56:05 +0000 | |
branch | bug235_bringup_0 |
changeset 76 | 24381b61de5c |
parent 71 | 243bbc1d70db |
permissions | -rw-r--r-- |
24 | 1 |
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 |
# All rights reserved. |
|
3 |
# This component and the accompanying materials are made available |
|
4 |
# under the terms of "Eclipse Public License v1.0" |
|
5 |
# which accompanies this distribution, and is available |
|
56
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
24 | 7 |
# |
8 |
# Initial Contributors: |
|
9 |
# Nokia Corporation - initial contribution. |
|
10 |
# |
|
11 |
# Contributors: |
|
12 |
# |
|
13 |
# Description: |
|
56
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
14 |
# CMake meta build file for the host components |
24 | 15 |
|
16 |
cmake_minimum_required (VERSION 2.8) |
|
17 |
||
56
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
18 |
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "Config types" FORCE) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
19 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
20 |
project(HostGraphics) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
21 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
22 |
set(LLVM_INSTALL_DIR ${PROJECT_SOURCE_DIR}/holdingarea/llvm) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
23 |
include(FindLLVM.cmake) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
24 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
25 |
add_definitions(-DUSE_FULL_EGL) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
26 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
27 |
if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
28 |
message("*** Defining profiling flags") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
29 |
add_definitions(-DSF_PROFILE) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
30 |
endif(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
31 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
32 |
# Some LLVM-definitions: |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
33 |
message("*** LLVM binaries ***") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
34 |
if(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
35 |
set(LLVM_CC "${LLVM_INSTALL_DIR}/llvm-gcc4.2-2.7-x86-mingw32/bin/llvm-g++") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
36 |
set(LLVM_LINK "${LLVM_INSTALL_DIR}/llvm-2.7/bin/llvm-link") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
37 |
set(LLVM_DIS "${LLVM_INSTALL_DIR}/llvm-2.7/bin/llvm-dis") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
38 |
else(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
39 |
set(LLVM_CC "llvm-g++") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
40 |
set(LLVM_LINK "llvm-link") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
41 |
set(LLVM_DIS "llvm-dis") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
42 |
endif(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
43 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
44 |
# Compiler flags before including any subprojects: |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
45 |
if(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
46 |
# Use defaults |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
47 |
else(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
48 |
set(C_DEFAULT_FLAGS "-Wall -std=c99 -pedantic-errors -Wno-variadic-macros -Wno-long-long -Wextra") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
49 |
set(CXX_DEFAULT_FLAGS "-Wall -std=c++98 -pedantic-errors -Wno-variadic-macros -Wno-long-long -Wextra") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
50 |
add_definitions(-D_GNU_SOURCE) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
51 |
endif(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
52 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_DEFAULT_FLAGS}") |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
53 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_DEFAULT_FLAGS}") |
24 | 54 |
|
56
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
55 |
if(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
56 |
set(LIBRARY_NAME_PREFIX lib) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
57 |
else(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
58 |
set(LIBRARY_NAME_PREFIX) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
59 |
endif(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
60 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
61 |
set(EXECUTABLE_BASE_DIR ${EPOCROOT}epoc32/release/tools2) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
62 |
set(GLOBAL_LIB_DIR ${EXECUTABLE_BASE_DIR}/lib) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
63 |
set(EXPORTED_INC_DIR ${EPOCROOT}epoc32/include/tools) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
64 |
set(COMMON_INC_DIR ${PROJECT_SOURCE_DIR}/inc) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
65 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
66 |
add_subdirectory(hostsupport/hostegl) # EGL for subprojects |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
67 |
add_subdirectory(hostsupport/hostopenvg) # Optimized OpenVG with RI as starting point |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
68 |
add_subdirectory(hostsupport/hostopengles11) # GLES to OGL wrapper |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
69 |
add_subdirectory(hostsupport/hostopengles20) # GLES2 to OGL wrapper |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
70 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
71 |
if(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
72 |
if (SIMULATOR_EXTENSIONS) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
73 |
add_subdirectory(vghwinterface/vghwapiwrapper) # Simulator serialization (host) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
74 |
add_dependencies(KhronosAPIWrapper libEGL libGLESv1 libGLESv2) |
71
243bbc1d70db
Expose wrapper C interface for Syborg from KhronosAPIWrapper. Needs update to QEMU!
Matt Plumtree <matt.plumtree@nokia.com>
parents:
56
diff
changeset
|
75 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 KhronosAPIWrapper) |
56
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
76 |
else(SIMULATOR_EXTENSIONS) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
77 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
78 |
endif(SIMULATOR_EXTENSIONS) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
79 |
else(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
80 |
# Wrapper not implemented |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
81 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
82 |
endif(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
83 |
|
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
84 |
if(WIN32) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
85 |
# These help create the win32 release |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
86 |
# \todo Use CMake on linux to do the same: Should create zips automatically. |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
87 |
if(CMAKE_BUILD_TYPE STREQUAL Debug) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
88 |
set_target_properties(${ALL_TARGETS} PROPERTIES |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
89 |
LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_LIB_DIR} |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
90 |
ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_LIB_DIR} |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
91 |
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_BASE_DIR}/deb) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
92 |
else(CMAKE_BUILD_TYPE STREQUAL Debug) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
93 |
set_target_properties(${ALL_TARGETS} PROPERTIES |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
94 |
LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_LIB_DIR} |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
95 |
ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_LIB_DIR} |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
96 |
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_BASE_DIR}/rel) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
97 |
endif(CMAKE_BUILD_TYPE STREQUAL Debug) |
40cc73c24bf8
Host components now buildable in their correct locations (although stil using CMake). Use build.bat in package root.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
24
diff
changeset
|
98 |
endif(WIN32) |