Skip to content

Commit

Permalink
fixed build with new toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Dec 26, 2022
1 parent fc5caaa commit c7a175c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
option(IHSPLAY_WIP_FEATURES "Enable Work-in-Progress Features" OFF)
set(IHSPLAY_FEATURE_RELMOUSE ON)

if ("$ENV{CROSS_COMPILE}" STREQUAL "arm-webos-linux-gnueabi-")
get_filename_component(CMAKE_C_COMPILER_NAME "${CMAKE_C_COMPILER}" NAME)

if (CMAKE_C_COMPILER_NAME MATCHES "^arm-webos-linux-gnueabi-")
set(TARGET_WEBOS TRUE)
# TODO: Remove usage of ENV{ARCH}
set(ENV{ARCH} "arm")
endif ()

if (NOT PROTOBUF_C_LIBRARIES OR NOT PROTOBUF_C_INCLUDEDIR)
Expand Down
9 changes: 8 additions & 1 deletion cmake/PackageWebOS.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
get_filename_component(CMAKE_C_COMPILER_NAME "${CMAKE_C_COMPILER}" NAME)
if (CMAKE_C_COMPILER_NAME MATCHES "^arm-webos-linux-gnueabi-")
set(CPACK_PACKAGE_ARCHITECTURE "arm")
else()
message(FATAL_ERROR "Unknown build architecture inferred from C compiler ${CMAKE_C_COMPILER_NAME}")
endif ()

set(CPACK_PACKAGE_NAME "org.mariotaku.ihsplay")
set(CPACK_GENERATOR "External")
set(CPACK_EXTERNAL_PACKAGE_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/AresPackage.cmake")
set(CPACK_EXTERNAL_ENABLE_STAGING TRUE)
set(CPACK_MONOLITHIC_INSTALL TRUE)
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_SOURCE_DIR}/dist)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${PROJECT_VERSION}_$ENV{ARCH}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${PROJECT_VERSION}_${CPACK_PACKAGE_ARCHITECTURE}")

# Copy manifest
configure_file(deploy/webos/appinfo.json.in ./appinfo.json @ONLY)
Expand Down

0 comments on commit c7a175c

Please sign in to comment.