Skip to content

Commit

Permalink
Improved cache_cleaner (#913)
Browse files Browse the repository at this point in the history
* Improve cache clearing

* Improve CEC installer

* Improve CEC installer (2)
  • Loading branch information
awawa-dev authored Jul 26, 2024
1 parent eff9bb8 commit f89b178
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Cache clearing action after closing PR
run-name: Cache clearing

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ jobs:
uses: yumemi-inc/clean-cache-action@v1
with:
ref: ${{ github.event.ref }}
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
key: ${{ runner.os }}-ccache

- name: Install TurboJPEG
shell: powershell
Expand Down
46 changes: 19 additions & 27 deletions cmake/installers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -302,40 +302,32 @@ macro(DeployUnix TARGET)
message(STATUS "QT plugin path: ${QT_PLUGINS_DIR}")

# Copy CEC lib
if (CEC_FOUND)
if (ENABLE_CEC)
# xrandr
find_library(XRANDR_LIBRARY NAMES Xrandr libXrandr libXrandr.so.2)

if (XRANDR_LIBRARY)
SET(resolved_file ${XRANDR_LIBRARY})
get_filename_component(resolved_file ${resolved_file} ABSOLUTE)
gp_append_unique(PREREQUISITE_LIBS ${resolved_file})
message(STATUS "Adding xrandr: ${resolved_file}")
get_filename_component(file_canonical ${resolved_file} REALPATH)
gp_append_unique(PREREQUISITE_LIBS ${file_canonical})
message(STATUS "Added xrandr(2): ${file_canonical}")
get_filename_component(resolvedXrandr ${XRANDR_LIBRARY} ABSOLUTE)
list (APPEND cecFiles ${resolvedXrandr})
endif()

# cec core
foreach(resolved_file_in ${CEC_LIBRARIES})
message(STATUS "Adding CEC: ${resolved_file_in}")
unset(LIBCEC CACHE)
find_library(LIBCEC NAMES ${resolved_file_in})
if (LIBCEC)
SET(resolved_file ${LIBCEC})
get_filename_component(resolved_file ${resolved_file} ABSOLUTE)
gp_append_unique(PREREQUISITE_LIBS ${resolved_file})
message(STATUS "Adding CEC(1): ${resolved_file}")
get_filename_component(file_canonical ${resolved_file} REALPATH)
gp_append_unique(PREREQUISITE_LIBS ${file_canonical})
message(STATUS "Added CEC(2): ${file_canonical}")
foreach(indexer RANGE 9)
set(resolved_fileLink "${resolved_file}.${indexer}")
if(EXISTS ${resolved_fileLink})
get_filename_component(resolved_fileLink ${resolved_fileLink} ABSOLUTE)
gp_append_unique(PREREQUISITE_LIBS ${resolved_fileLink})
message(STATUS "Adding CEC(3): ${resolved_fileLink}")
endif()
endforeach()
get_filename_component(resolvedCec ${LIBCEC} ABSOLUTE)
list (APPEND cecFiles ${resolvedCec})
endif()
endforeach()

# install cec
foreach(cecFile ${cecFiles})
FILE(GLOB foundCec "${cecFile}*")
foreach(installCec ${foundCec})
message(STATUS "Adding CEC: ${installCec}")
gp_append_unique(PREREQUISITE_LIBS ${installCec})
endforeach()
endforeach()
endif()

Expand Down Expand Up @@ -406,7 +398,7 @@ macro(DeployUnix TARGET)
"libxcb-xfixes0"
"libxcb-xkb1"
"libxkbcommon-x11-0"
"ld-linux-x86-64"
"ld-"
"libasound"
"libblkid"
"libbrotlicommon"
Expand Down Expand Up @@ -483,12 +475,12 @@ macro(DeployUnix TARGET)

foreach(myitem ${SYSTEM_LIBS_SKIP})
string(FIND ${resolved} ${myitem} _index)
if (${_index} GREATER -1)
if (${_index} EQUAL 0)
break()
endif()
endforeach()

if (${_index} GREATER -1)
if (${_index} EQUAL 0)
continue() # Skip system libraries
else()
gp_resolve_item("${TARGET_FILE}" "${DEPENDENCY}" "" "" resolved_file)
Expand Down

0 comments on commit f89b178

Please sign in to comment.