summaryrefslogtreecommitdiffstats
path: root/cmake/platform
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/platform')
-rw-r--r--cmake/platform/android/android.cmake7
-rw-r--r--cmake/platform/android/defines.txt1
-rw-r--r--cmake/platform/darwin_embedded/defines.txt1
-rw-r--r--cmake/platform/darwin_embedded/ios.cmake1
-rw-r--r--cmake/platform/darwin_embedded/tvos.cmake2
-rw-r--r--cmake/platform/freebsd/defines.txt1
-rw-r--r--cmake/platform/freebsd/gbm.cmake2
-rw-r--r--cmake/platform/freebsd/wayland.cmake1
-rw-r--r--cmake/platform/freebsd/x11.cmake2
-rw-r--r--cmake/platform/linux/defines.txt1
-rw-r--r--cmake/platform/linux/gbm.cmake8
-rw-r--r--cmake/platform/linux/wayland.cmake14
-rw-r--r--cmake/platform/linux/x11.cmake9
-rw-r--r--cmake/platform/osx/defines.txt1
-rw-r--r--cmake/platform/osx/osx.cmake20
-rw-r--r--cmake/platform/windows/defines.txt1
-rw-r--r--cmake/platform/windows/windows.cmake2
-rw-r--r--cmake/platform/windowsstore/defines.txt1
-rw-r--r--cmake/platform/windowsstore/windowsstore.cmake2
19 files changed, 77 insertions, 0 deletions
diff --git a/cmake/platform/android/android.cmake b/cmake/platform/android/android.cmake
new file mode 100644
index 0000000..2c4fbb4
--- /dev/null
+++ b/cmake/platform/android/android.cmake
@@ -0,0 +1,7 @@
+set(PLATFORM_REQUIRED_DEPS LibAndroidJNI OpenGLES EGL LibZip)
+set(APP_RENDER_SYSTEM gles)
+
+# Store SDK compile version
+set(TARGET_SDK 33)
+# Minimum supported SDK version
+set(TARGET_MINSDK 21)
diff --git a/cmake/platform/android/defines.txt b/cmake/platform/android/defines.txt
new file mode 100644
index 0000000..4b70e59
--- /dev/null
+++ b/cmake/platform/android/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID
diff --git a/cmake/platform/darwin_embedded/defines.txt b/cmake/platform/darwin_embedded/defines.txt
new file mode 100644
index 0000000..603d749
--- /dev/null
+++ b/cmake/platform/darwin_embedded/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_EMBEDDED
diff --git a/cmake/platform/darwin_embedded/ios.cmake b/cmake/platform/darwin_embedded/ios.cmake
new file mode 100644
index 0000000..55d7c4a
--- /dev/null
+++ b/cmake/platform/darwin_embedded/ios.cmake
@@ -0,0 +1 @@
+list(APPEND ARCH_DEFINES -DTARGET_DARWIN_IOS)
diff --git a/cmake/platform/darwin_embedded/tvos.cmake b/cmake/platform/darwin_embedded/tvos.cmake
new file mode 100644
index 0000000..8d2538c
--- /dev/null
+++ b/cmake/platform/darwin_embedded/tvos.cmake
@@ -0,0 +1,2 @@
+list(APPEND ARCH_DEFINES -DTARGET_DARWIN_TVOS)
+set(ENABLE_AIRTUNES OFF CACHE BOOL "" FORCE)
diff --git a/cmake/platform/freebsd/defines.txt b/cmake/platform/freebsd/defines.txt
new file mode 100644
index 0000000..bd23e57
--- /dev/null
+++ b/cmake/platform/freebsd/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_FREEBSD
diff --git a/cmake/platform/freebsd/gbm.cmake b/cmake/platform/freebsd/gbm.cmake
new file mode 100644
index 0000000..2d20731
--- /dev/null
+++ b/cmake/platform/freebsd/gbm.cmake
@@ -0,0 +1,2 @@
+include(cmake/platform/linux/gbm.cmake)
+list(APPEND PLATFORM_REQUIRED_DEPS EpollShim)
diff --git a/cmake/platform/freebsd/wayland.cmake b/cmake/platform/freebsd/wayland.cmake
new file mode 100644
index 0000000..c9c1d00
--- /dev/null
+++ b/cmake/platform/freebsd/wayland.cmake
@@ -0,0 +1 @@
+include(cmake/platform/linux/wayland.cmake)
diff --git a/cmake/platform/freebsd/x11.cmake b/cmake/platform/freebsd/x11.cmake
new file mode 100644
index 0000000..307dac3
--- /dev/null
+++ b/cmake/platform/freebsd/x11.cmake
@@ -0,0 +1,2 @@
+list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL X XRandR LibDRM)
+list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI VDPAU GLX)
diff --git a/cmake/platform/linux/defines.txt b/cmake/platform/linux/defines.txt
new file mode 100644
index 0000000..88d2e6e
--- /dev/null
+++ b/cmake/platform/linux/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_LINUX -fPIC
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake
new file mode 100644
index 0000000..5e0475a
--- /dev/null
+++ b/cmake/platform/linux/gbm.cmake
@@ -0,0 +1,8 @@
+list(APPEND PLATFORM_REQUIRED_DEPS GBM LibDRM LibInput Xkbcommon UDEV)
+list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
+
+if(APP_RENDER_SYSTEM STREQUAL "gl")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL)
+elseif(APP_RENDER_SYSTEM STREQUAL "gles")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES EGL)
+endif()
diff --git a/cmake/platform/linux/wayland.cmake b/cmake/platform/linux/wayland.cmake
new file mode 100644
index 0000000..1adcd8f
--- /dev/null
+++ b/cmake/platform/linux/wayland.cmake
@@ -0,0 +1,14 @@
+list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1)
+list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
+
+if(APP_RENDER_SYSTEM STREQUAL "gl")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGl EGL)
+elseif(APP_RENDER_SYSTEM STREQUAL "gles")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES EGL)
+endif()
+
+set(PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-extra-protocols)
+set(WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}")
+
+# for wayland-extra-protocols.hpp
+include_directories("${WAYLAND_EXTRA_PROTOCOL_GENERATED_DIR}")
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake
new file mode 100644
index 0000000..5f5b8c2
--- /dev/null
+++ b/cmake/platform/linux/x11.cmake
@@ -0,0 +1,9 @@
+list(APPEND PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM)
+list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
+
+if(APP_RENDER_SYSTEM STREQUAL "gl")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGl)
+ list(APPEND PLATFORM_OPTIONAL_DEPS GLX VDPAU)
+elseif(APP_RENDER_SYSTEM STREQUAL "gles")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGLES)
+endif()
diff --git a/cmake/platform/osx/defines.txt b/cmake/platform/osx/defines.txt
new file mode 100644
index 0000000..8ebb2ba
--- /dev/null
+++ b/cmake/platform/osx/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX
diff --git a/cmake/platform/osx/osx.cmake b/cmake/platform/osx/osx.cmake
new file mode 100644
index 0000000..cd3a996
--- /dev/null
+++ b/cmake/platform/osx/osx.cmake
@@ -0,0 +1,20 @@
+if(NOT APP_RENDER_SYSTEM OR APP_RENDER_SYSTEM STREQUAL "gl")
+ list(APPEND PLATFORM_REQUIRED_DEPS OpenGl)
+ set(APP_RENDER_SYSTEM gl)
+ list(APPEND SYSTEM_DEFINES -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
+ -DGL_SILENCE_DEPRECATION)
+else()
+ message(SEND_ERROR "Currently only OpenGL rendering is supported. Please set APP_RENDER_SYSTEM to \"gl\"")
+endif()
+
+if(NOT APP_WINDOW_SYSTEM OR APP_WINDOW_SYSTEM STREQUAL sdl)
+ list(APPEND SYSTEM_DEFINES -DHAS_SDL)
+ list(APPEND PLATFORM_REQUIRED_DEPS Sdl)
+ list(APPEND CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/SDL/SDLMain.mm
+ ${CMAKE_SOURCE_DIR}/xbmc/platform/posix/main.cpp)
+elseif(APP_WINDOW_SYSTEM STREQUAL native)
+ # native windowing and input
+ list(APPEND CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/darwin/osx/XBMCApplication.mm)
+else()
+ message(SEND_ERROR "Only SDL or native windowing options are supported.")
+endif()
diff --git a/cmake/platform/windows/defines.txt b/cmake/platform/windows/defines.txt
new file mode 100644
index 0000000..137a3d6
--- /dev/null
+++ b/cmake/platform/windows/defines.txt
@@ -0,0 +1 @@
+-DTARGET_WINDOWS -DTARGET_WINDOWS_DESKTOP -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS \ No newline at end of file
diff --git a/cmake/platform/windows/windows.cmake b/cmake/platform/windows/windows.cmake
new file mode 100644
index 0000000..b0c2992
--- /dev/null
+++ b/cmake/platform/windows/windows.cmake
@@ -0,0 +1,2 @@
+set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
+set(APP_RENDER_SYSTEM dx11)
diff --git a/cmake/platform/windowsstore/defines.txt b/cmake/platform/windowsstore/defines.txt
new file mode 100644
index 0000000..09e1b08
--- /dev/null
+++ b/cmake/platform/windowsstore/defines.txt
@@ -0,0 +1 @@
+-DTARGET_WINDOWS -DTARGET_WINDOWS_STORE -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS \ No newline at end of file
diff --git a/cmake/platform/windowsstore/windowsstore.cmake b/cmake/platform/windowsstore/windowsstore.cmake
new file mode 100644
index 0000000..b0c2992
--- /dev/null
+++ b/cmake/platform/windowsstore/windowsstore.cmake
@@ -0,0 +1,2 @@
+set(PLATFORM_REQUIRED_DEPS D3DX11Effects)
+set(APP_RENDER_SYSTEM dx11)