forked from Igalia/WPEBackend-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (42 loc) · 1.37 KB
/
CMakeLists.txt
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
project(WPEBackend-android)
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(PkgConfig)
pkg_check_modules(WPE wpe-1.0 REQUIRED)
find_package(GLIB 2.40.0 REQUIRED COMPONENTS gio gobject gthread gmodule)
set(WPE_ANDROID_PUBLIC_HDRS
"include/wpe-android/view-backend-exportable.h"
)
set(WPE_ANDROID_INCLUDE_DIRECTORIES
${GLIB_INCLUDE_DIRS}
${WPE_INCLUDE_DIRS}
"include"
)
set(WPE_ANDROID_LIBRARIES
${GLIB_LIBRARIES}
${GLIB_GIO_LIBRARIES}
${GLIB_GOBJECT_LIBRARIES}
${WPE_LIBRARIES}
android
c++_shared
log
EGL
GLESv2
)
set(WPE_ANDROID_SOURCES
src/android.cpp
src/hacks.cpp
src/ipc.cpp
src/renderer-backend-egl.cpp
src/renderer-host.cpp
src/view-backend-exportable.cpp
)
add_library(WPEBackend-android SHARED ${WPE_ANDROID_SOURCES})
target_include_directories(WPEBackend-android PRIVATE ${WPE_ANDROID_INCLUDE_DIRECTORIES})
target_link_libraries(WPEBackend-android ${WPE_ANDROID_LIBRARIES})
set(INSTALL_INC_DIR "${CMAKE_INSTALL_INCLUDEDIR}/wpe-android" CACHE PATH "Installation directory for headers")
install(TARGETS WPEBackend-android
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${WPE_ANDROID_PUBLIC_HDRS} DESTINATION ${INSTALL_INC_DIR})