|
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 |
|
30 set(GLES2_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/GLES2) |
|
31 set(GLES2_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/include) |
|
32 |
|
33 if(WIN32) |
|
34 message("*** EGL Win32") |
|
35 set(GLES2_SSE_FLAGS "/arch:SSE2") |
|
36 set(GLES2_PLATFORM_LINK_LIBRARIES "") |
|
37 else(WIN32) |
|
38 set(GLES2_SSE_FLAGS "-msse2 -mfpmath=sse -march=pentium4") |
|
39 set(GLES2_PLATFORM_LINK_LIBRARIES m stdc++) |
|
40 endif(WIN32) |
|
41 |
|
42 set(GLES2_SRC_FILES |
|
43 ${GLES2_INC_DIR}/common.h |
|
44 |
|
45 ${GLES2_SRC_DIR}/buffer.h |
|
46 ${GLES2_SRC_DIR}/context.h |
|
47 ${GLES2_SRC_DIR}/degl.h |
|
48 ${GLES2_SRC_DIR}/get.h |
|
49 ${GLES2_SRC_DIR}/half.h |
|
50 ${GLES2_SRC_DIR}/hgl.h |
|
51 ${GLES2_SRC_DIR}/object.h |
|
52 ${GLES2_SRC_DIR}/platform.h |
|
53 ${GLES2_SRC_DIR}/program.h |
|
54 ${GLES2_SRC_DIR}/shader.h |
|
55 ${GLES2_SRC_DIR}/vertex.h |
|
56 ${GLES2_SRC_DIR}/texture.h |
|
57 ${GLES2_SRC_DIR}/util.h |
|
58 ${GLES2_SRC_DIR}/fbo.h |
|
59 |
|
60 ${GLES2_SRC_DIR}/blend.c |
|
61 ${GLES2_SRC_DIR}/buffer.c |
|
62 ${GLES2_SRC_DIR}/clear.c |
|
63 ${GLES2_SRC_DIR}/context.c |
|
64 ${GLES2_SRC_DIR}/depth.c |
|
65 ${GLES2_SRC_DIR}/draw.c |
|
66 ${GLES2_SRC_DIR}/fbo.c |
|
67 ${GLES2_SRC_DIR}/get.c |
|
68 ${GLES2_SRC_DIR}/half.c |
|
69 ${GLES2_SRC_DIR}/hgl.c |
|
70 ${GLES2_SRC_DIR}/object.c |
|
71 ${GLES2_SRC_DIR}/pixel.c |
|
72 ${GLES2_SRC_DIR}/platform.c |
|
73 ${GLES2_SRC_DIR}/program.c |
|
74 ${GLES2_SRC_DIR}/shader.c |
|
75 ${GLES2_SRC_DIR}/stencil.c |
|
76 ${GLES2_SRC_DIR}/texture.c |
|
77 ${GLES2_SRC_DIR}/vertex.c |
|
78 ${GLES2_SRC_DIR}/util.c |
|
79 ${GLES2_SRC_DIR}/degl.cpp |
|
80 ) |
|
81 |
|
82 include_directories( |
|
83 ${GLES2_SRC_DIR} |
|
84 ${GLES2_INC_DIR} |
|
85 ${COMMON_INC_DIR} |
|
86 ) |
|
87 |
|
88 if (WIN32) |
|
89 add_definitions(-DCONFIG_WIN32 -DBUILD_GLES2) |
|
90 else(WIN32) |
|
91 add_definitions(-DCONFIG_X11 -DBUILD_GLES2) |
|
92 endif(WIN32) |
|
93 |
|
94 add_library(${LIBRARY_NAME_PREFIX}GLESv2 SHARED ${GLES2_SRC_FILES}) |
|
95 |
|
96 target_link_libraries(${LIBRARY_NAME_PREFIX}GLESv2 ${GLES2_PLATFORM_LINK_LIBRARIES}) |