author | Matt Plumtree <matt.plumtree@nokia.com> |
Wed, 10 Nov 2010 15:26:31 +0000 | |
branch | bug235_bringup_0 |
changeset 75 | 82d8da1d79c7 |
parent 49 | 3b4f7e9d873f |
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 |
|
49
3b4f7e9d873f
Fix accidentally corrupted EPL URLs in CMakeLists.txt files.
Matt Plumtree <matt.plumtree@nokia.com>
parents:
36
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: |
|
14 |
# CMake meta build file for the host components in the holdingarea |
|
15 |
||
16 |
cmake_minimum_required (VERSION 2.8) |
|
17 |
||
18 |
set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "Config types" FORCE) |
|
19 |
||
20 |
project(PlatsimGraphics) |
|
21 |
||
22 |
include(cmake/FindLLVM.cmake) |
|
23 |
||
24 |
option( |
|
25 |
USE_MINI_EGL |
|
26 |
"Use the small EGL implementation that came with the RI." |
|
27 |
OFF) |
|
28 |
||
29 |
option( |
|
30 |
DEV_EXTRAS |
|
31 |
"Compile internally used components. Not available in public release." |
|
32 |
OFF) |
|
33 |
||
34 |
if(NOT USE_MINI_EGL) |
|
35 |
message("*** Using proper EGL") |
|
36 |
add_definitions(-DUSE_FULL_EGL) |
|
37 |
else(NOT USE_MINI_EGL) |
|
38 |
message("*** Using riMiniEGL") |
|
39 |
endif(NOT USE_MINI_EGL) |
|
40 |
||
41 |
if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) |
|
42 |
message("*** Defining profiling flags") |
|
43 |
add_definitions(-DSF_PROFILE) |
|
44 |
endif(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo) |
|
45 |
||
46 |
# Some LLVM-definitions: |
|
47 |
message("*** LLVM binaries ***") |
|
48 |
if(WIN32) |
|
49 |
set(LLVM_CC "${PROJECT_SOURCE_DIR}/llvm/llvm-gcc4.2-2.7-x86-mingw32/bin/llvm-g++") |
|
50 |
set(LLVM_LINK "${PROJECT_SOURCE_DIR}/llvm/llvm-2.7/bin/llvm-link") |
|
51 |
set(LLVM_DIS "${PROJECT_SOURCE_DIR}/llvm/llvm-2.7/bin/llvm-dis") |
|
52 |
else(WIN32) |
|
53 |
set(LLVM_CC "llvm-g++") |
|
54 |
set(LLVM_LINK "llvm-link") |
|
55 |
set(LLVM_DIS "llvm-dis") |
|
56 |
endif(WIN32) |
|
57 |
||
58 |
# Compiler flags before including any subprojects: |
|
59 |
if(WIN32) |
|
60 |
# Use defaults |
|
61 |
else(WIN32) |
|
62 |
set(C_DEFAULT_FLAGS "-Wall -std=c99 -pedantic-errors -Wno-variadic-macros -Wno-long-long -Wextra") |
|
63 |
set(CXX_DEFAULT_FLAGS "-Wall -std=c++98 -pedantic-errors -Wno-variadic-macros -Wno-long-long -Wextra") |
|
64 |
add_definitions(-D_GNU_SOURCE) |
|
65 |
endif(WIN32) |
|
66 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${C_DEFAULT_FLAGS}") |
|
67 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_DEFAULT_FLAGS}") |
|
68 |
||
69 |
if(WIN32) |
|
70 |
set(LIBRARY_NAME_PREFIX lib) |
|
71 |
else(WIN32) |
|
72 |
set(LIBRARY_NAME_PREFIX) |
|
73 |
endif(WIN32) |
|
74 |
||
75 |
set(GLOBAL_LIB_DIR ${PROJECT_SOURCE_DIR}/lib) |
|
76 |
set(COMMON_INC_DIR ${PROJECT_SOURCE_DIR}/inc) |
|
77 |
||
78 |
add_subdirectory(libEGL) # EGL for subprojects |
|
79 |
add_subdirectory(vg/2D_OpenVG_1_1_SF) # Optimized OpenVG with RI as starting point |
|
80 |
# Any project using OpenVG can use this to get access to VG/ include directory. |
|
81 |
# \note If OpenVG was to be made into a module, this should be in, e.g., FindOpenVG. |
|
82 |
set(OPENVG_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/vg/2D_OpenVG_1_1_SF/ri/include/) |
|
83 |
||
84 |
add_subdirectory(libGLESv1) # GLES to OGL wrapper |
|
85 |
add_subdirectory(libGLESv2) # GLES2 to OGL wrapper |
|
86 |
||
87 |
if(DEV_EXTRAS) |
|
88 |
set(DEV_EXTRA_TARGETS conformes11-conform conformes11-covegl conformes11-covgl conformes11-primtest expat conformes20) |
|
89 |
add_subdirectory(vg/tiger) # Initial benchmark for solid-fill changes, aa. |
|
90 |
add_subdirectory(conformes11) |
|
91 |
add_subdirectory(conformes20) |
|
92 |
if(NOT WIN32) |
|
93 |
# Disabled from win32-build since we should use binaries there: |
|
94 |
add_subdirectory(spandex/parser) # Parser generator from customer |
|
95 |
add_subdirectory(spandex/vg) # Test suite from customer |
|
96 |
endif(NOT WIN32) |
|
97 |
endif(DEV_EXTRAS) |
|
98 |
||
99 |
if(WIN32) |
|
100 |
if (PLATSIM_EXTENSIONS) |
|
36
563aa0c4cea3
Moved syborggraphicswrapper from qemu package
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
24
diff
changeset
|
101 |
add_subdirectory(serialization/Graphics/KhronosAPIWrapper) # Simulator serialization (host) |
24 | 102 |
add_dependencies(KhronosAPIWrapper libEGL libGLESv1 libGLESv2 hostthreadadapter) |
36
563aa0c4cea3
Moved syborggraphicswrapper from qemu package
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
24
diff
changeset
|
103 |
add_subdirectory(syborggraphicswrapper) # Simulator serialization (guest) |
563aa0c4cea3
Moved syborggraphicswrapper from qemu package
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
24
diff
changeset
|
104 |
add_dependencies(syborg-graphicswrapper KhronosAPIWrapper hostthreadadapter) |
563aa0c4cea3
Moved syborggraphicswrapper from qemu package
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
24
diff
changeset
|
105 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 hostthreadadapter KhronosAPIWrapper syborg-graphicswrapper ${DEV_EXTRA_TARGETS}) |
24 | 106 |
else(PLATSIM_EXTENSIONS) |
107 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 ${DEV_EXTRA_TARGETS}) |
|
108 |
endif(PLATSIM_EXTENSIONS) |
|
109 |
else(WIN32) |
|
110 |
# Wrapper not implemented |
|
111 |
set(ALL_TARGETS libEGL libOpenVG libGLESv1 libGLESv2 ${DEV_EXTRA_TARGETS}) |
|
112 |
if(DEV_EXTRAS) |
|
113 |
add_subdirectory(vg/2D_OpenVG_1_1) # Accelerated reference provided by customer ("s60") |
|
114 |
add_subdirectory(vg/s60_tiger) # "s60" build of the tiger benchmark |
|
115 |
add_subdirectory(vg/original_sf) # Original OpenVG before optimizations |
|
116 |
add_subdirectory(vg/2D_OpenVG_tests/vg_gremlin) # Fuzzer |
|
117 |
endif(DEV_EXTRAS) |
|
118 |
endif(WIN32) |
|
119 |
||
120 |
if(WIN32) |
|
121 |
# These help create the win32 release |
|
122 |
# \todo Use CMake on linux to do the same: Should create zips automatically. |
|
123 |
set_target_properties(${ALL_TARGETS} PROPERTIES |
|
124 |
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib |
|
125 |
ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib |
|
126 |
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) |
|
127 |
endif(WIN32) |