1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# -*- Mode: CMake; indent-tabs-mode: nil; tab-width: 2 -*-
#
# Copyright © 2014 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
pkg_check_modules(GLIB REQUIRED glib-2.0)
find_package(GLESv2 REQUIRED)
function(png2header png header varname)
add_custom_command(
OUTPUT ${header}
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/png2header.py ${png} ${varname} > ${header}
DEPENDS ${png} ${CMAKE_CURRENT_SOURCE_DIR}/png2header.py
)
endfunction()
png2header(
${CMAKE_CURRENT_SOURCE_DIR}/spinner-glow.png
${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h
spinner_glow
)
png2header(
${CMAKE_CURRENT_SOURCE_DIR}/spinner-logo.png
${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h
spinner_logo
)
include_directories(
${GLIB_INCLUDE_DIRS}
${GLESv2_INCLUDE_DIRS}
${MIRCLIENT_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
)
link_directories(${MIRCLIENT_LIBRARY_DIRS})
add_library(miral-spinner STATIC
eglapp.cpp
eglapp.h
eglspinner.cpp
miregl.h
miregl.cpp
${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h
${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h
)
target_link_libraries(miral-spinner
EGL
${GLIB_LDFLAGS}
${GLESv2_LIBRARIES}
${MIRCLIENT_LDFLAGS}
)
|