Skip to content

Commit 2ab61d7

Browse files
committed
add webOS to CMakeLists
1 parent d1171e4 commit 2ab61d7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

CMakeLists.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ if(CMAKE_SYSTEM_PROCESSOR)
4848
execute_process(COMMAND cat /proc/cpuinfo OUTPUT_VARIABLE OUTSTR)
4949
string(FIND "${OUTSTR}" "ODROID-XU" pos)
5050
if(NOT (pos LESS 0))
51-
add_compile_options(-mfloat-abi=hard -marm -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -fomit-frame-pointer)
51+
if(NOT WEBOS)
52+
add_compile_options(-mfloat-abi=hard -marm -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -fomit-frame-pointer)
53+
endif()
5254
set(ARM_NO_VULKAN ON)
5355
endif()
5456
endif()
@@ -114,6 +116,11 @@ else()
114116
set(DEFAULT_USE_SYSTEM_LIBSDL2 ON)
115117
endif()
116118

119+
if(CMAKE_CXX_COMPILER MATCHES "webos" OR
120+
CMAKE_CXX_COMPILER MATCHES "starfish")
121+
set(WEBOS ON)
122+
endif()
123+
117124
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
118125
if(NOT IOS)
119126
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl)
@@ -211,6 +218,13 @@ if(USE_CCACHE)
211218
include(ccache)
212219
endif()
213220

221+
if(WEBOS)
222+
set(ARMV7 ON CACHE BOOL "" FORCE)
223+
set(USING_X11_VULKAN OFF CACHE BOOL "" FORCE)
224+
set(USING_GLES2 ON CACHE BOOL "" FORCE)
225+
set(USE_SYSTEM_ZSTD OFF CACHE BOOL "" FORCE)
226+
endif()
227+
214228
if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
215229
if(USING_X11_VULKAN)
216230
message("Using X11 for Vulkan")
@@ -1013,6 +1027,9 @@ if(USE_FFMPEG)
10131027
set(PLATFORM_ARCH "Windows/x86")
10141028
endif()
10151029
endif()
1030+
if(WEBOS)
1031+
set(PLATFORM_ARCH "linux/webos")
1032+
endif()
10161033
if(PLATFORM_ARCH)
10171034
set(FFMPEG_DIR "ffmpeg/${PLATFORM_ARCH}")
10181035
else()

0 commit comments

Comments
 (0)