author | Matt Plumtree <matt.plumtree@nokia.com> |
Mon, 08 Nov 2010 15:40:06 +0000 | |
branch | bug235_bringup_0 |
changeset 74 | 4ba73111e824 |
parent 56 | 40cc73c24bf8 |
permissions | -rw-r--r-- |
24 | 1 |
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 |
# |
|
3 |
# Permission is hereby granted, free of charge, to any person obtaining a |
|
4 |
# copy of this software and /or associated documentation files |
|
5 |
# (the "Materials "), to deal in the Materials without restriction, |
|
6 |
# including without limitation the rights to use, copy, modify, merge, |
|
7 |
# publish, distribute, sublicense, and/or sell copies of the Materials, |
|
8 |
# and to permit persons to whom the Materials are furnished to do so, |
|
9 |
# subject to the following conditions: |
|
10 |
# |
|
11 |
# The above copyright notice and this permission notice shall be included |
|
12 |
# in all copies or substantial portions of the Materials. |
|
13 |
# |
|
14 |
# THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
15 |
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
16 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
17 |
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
|
18 |
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
|
19 |
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
|
20 |
# THE USE OR OTHER DEALINGS IN THE MATERIALS. |
|
21 |
# |
|
22 |
# Initial Contributors: |
|
23 |
# Nokia Corporation - initial contribution. |
|
24 |
# |
|
25 |
# Contributors: |
|
26 |
# |
|
27 |
# Description: |
|
28 |
# CMake meta build file for host libGLESv2 |
|
29 |
||
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:
53
diff
changeset
|
30 |
set(GLES2_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) |
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:
53
diff
changeset
|
31 |
set(GLES2_INC_DIR ${CMAKE_CURRENT_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:
53
diff
changeset
|
32 |
|
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:
53
diff
changeset
|
33 |
configure_file(${GLES2_INC_DIR}/GLES2/gl2.h ${EXPORTED_INC_DIR}/GLES2/gl2.h COPYONLY) |
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:
53
diff
changeset
|
34 |
configure_file(${GLES2_INC_DIR}/GLES2/gl2ext.h ${EXPORTED_INC_DIR}/GLES2/gl2ext.h COPYONLY) |
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:
53
diff
changeset
|
35 |
configure_file(${GLES2_INC_DIR}/GLES2/gl2platform.h ${EXPORTED_INC_DIR}/GLES2/gl2platform.h COPYONLY) |
24 | 36 |
|
37 |
if(WIN32) |
|
38 |
message("*** EGL Win32") |
|
39 |
set(GLES2_SSE_FLAGS "/arch:SSE2") |
|
40 |
set(GLES2_PLATFORM_LINK_LIBRARIES "") |
|
41 |
else(WIN32) |
|
42 |
set(GLES2_SSE_FLAGS "-msse2 -mfpmath=sse -march=pentium4") |
|
43 |
set(GLES2_PLATFORM_LINK_LIBRARIES m stdc++) |
|
44 |
endif(WIN32) |
|
45 |
||
46 |
set(GLES2_SRC_FILES |
|
47 |
${GLES2_INC_DIR}/common.h |
|
48 |
||
49 |
${GLES2_SRC_DIR}/buffer.h |
|
50 |
${GLES2_SRC_DIR}/context.h |
|
51 |
${GLES2_SRC_DIR}/degl.h |
|
52 |
${GLES2_SRC_DIR}/get.h |
|
53 |
${GLES2_SRC_DIR}/half.h |
|
54 |
${GLES2_SRC_DIR}/hgl.h |
|
55 |
${GLES2_SRC_DIR}/object.h |
|
56 |
${GLES2_SRC_DIR}/platform.h |
|
57 |
${GLES2_SRC_DIR}/program.h |
|
58 |
${GLES2_SRC_DIR}/shader.h |
|
59 |
${GLES2_SRC_DIR}/vertex.h |
|
60 |
${GLES2_SRC_DIR}/texture.h |
|
61 |
${GLES2_SRC_DIR}/util.h |
|
62 |
${GLES2_SRC_DIR}/fbo.h |
|
63 |
||
64 |
${GLES2_SRC_DIR}/blend.c |
|
65 |
${GLES2_SRC_DIR}/buffer.c |
|
66 |
${GLES2_SRC_DIR}/clear.c |
|
67 |
${GLES2_SRC_DIR}/context.c |
|
68 |
${GLES2_SRC_DIR}/depth.c |
|
69 |
${GLES2_SRC_DIR}/draw.c |
|
70 |
${GLES2_SRC_DIR}/fbo.c |
|
71 |
${GLES2_SRC_DIR}/get.c |
|
72 |
${GLES2_SRC_DIR}/half.c |
|
73 |
${GLES2_SRC_DIR}/hgl.c |
|
74 |
${GLES2_SRC_DIR}/object.c |
|
75 |
${GLES2_SRC_DIR}/pixel.c |
|
76 |
${GLES2_SRC_DIR}/platform.c |
|
77 |
${GLES2_SRC_DIR}/program.c |
|
78 |
${GLES2_SRC_DIR}/shader.c |
|
79 |
${GLES2_SRC_DIR}/stencil.c |
|
80 |
${GLES2_SRC_DIR}/texture.c |
|
81 |
${GLES2_SRC_DIR}/vertex.c |
|
82 |
${GLES2_SRC_DIR}/util.c |
|
83 |
${GLES2_SRC_DIR}/degl.cpp |
|
84 |
) |
|
85 |
||
86 |
include_directories( |
|
87 |
${GLES2_SRC_DIR} |
|
88 |
${GLES2_INC_DIR} |
|
89 |
${COMMON_INC_DIR} |
|
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:
53
diff
changeset
|
90 |
${EXPORTED_INC_DIR} |
24 | 91 |
) |
92 |
||
93 |
if (WIN32) |
|
94 |
add_definitions(-DCONFIG_WIN32 -DBUILD_GLES2) |
|
95 |
else(WIN32) |
|
96 |
add_definitions(-DCONFIG_X11 -DBUILD_GLES2) |
|
97 |
endif(WIN32) |
|
98 |
||
99 |
add_library(${LIBRARY_NAME_PREFIX}GLESv2 SHARED ${GLES2_SRC_FILES}) |
|
100 |
||
101 |
target_link_libraries(${LIBRARY_NAME_PREFIX}GLESv2 ${GLES2_PLATFORM_LINK_LIBRARIES}) |