1 parent
639362fbf5
commit
bdd69f0aad
101 files changed
+22691
-531
No files matched your search
@@ -16,11 +16,20 @@ endif()
|
||||
|
||||
cmake_path(ABSOLUTE_PATH BUNDLE_ROOT NORMALIZE OUTPUT_VARIABLE _bundle_root)
|
||||
set(_executable "${_bundle_root}/bin/echoiond")
|
||||
set(_updater "${_bundle_root}/bin/echoion-updater")
|
||||
set(_core "${_bundle_root}/lib/Echoion.ts")
|
||||
set(_library_dir "${_bundle_root}/lib")
|
||||
if(NOT DEFINED BUNDLE_RESOLVER_EXECUTABLE OR
|
||||
BUNDLE_RESOLVER_EXECUTABLE STREQUAL "")
|
||||
set(BUNDLE_RESOLVER_EXECUTABLE "${_executable}")
|
||||
if(NOT DEFINED BUNDLE_RESOLVER_EXECUTABLES OR
|
||||
BUNDLE_RESOLVER_EXECUTABLES STREQUAL "")
|
||||
if(DEFINED BUNDLE_RESOLVER_EXECUTABLE AND
|
||||
NOT BUNDLE_RESOLVER_EXECUTABLE STREQUAL "")
|
||||
set(BUNDLE_RESOLVER_EXECUTABLES "${BUNDLE_RESOLVER_EXECUTABLE}")
|
||||
else()
|
||||
set(BUNDLE_RESOLVER_EXECUTABLES "${_executable}")
|
||||
if(EXISTS "${_updater}")
|
||||
list(APPEND BUNDLE_RESOLVER_EXECUTABLES "${_updater}")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED BUNDLE_RESOLVER_LIBRARIES OR
|
||||
BUNDLE_RESOLVER_LIBRARIES STREQUAL "")
|
||||
@@ -33,12 +42,14 @@ endif()
|
||||
if(NOT EXISTS "${_core}")
|
||||
message(FATAL_ERROR "Missing staged Core library: ${_core}")
|
||||
endif()
|
||||
if(NOT IS_ABSOLUTE "${BUNDLE_RESOLVER_EXECUTABLE}" OR
|
||||
NOT EXISTS "${BUNDLE_RESOLVER_EXECUTABLE}" OR
|
||||
IS_DIRECTORY "${BUNDLE_RESOLVER_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Missing absolute dependency resolver executable: ${BUNDLE_RESOLVER_EXECUTABLE}")
|
||||
endif()
|
||||
foreach(_resolver_executable IN LISTS BUNDLE_RESOLVER_EXECUTABLES)
|
||||
if(NOT IS_ABSOLUTE "${_resolver_executable}" OR
|
||||
NOT EXISTS "${_resolver_executable}" OR
|
||||
IS_DIRECTORY "${_resolver_executable}")
|
||||
message(FATAL_ERROR
|
||||
"Missing absolute dependency resolver executable: ${_resolver_executable}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(_resolver_library IN LISTS BUNDLE_RESOLVER_LIBRARIES)
|
||||
if(NOT IS_ABSOLUTE "${_resolver_library}" OR
|
||||
NOT EXISTS "${_resolver_library}" OR
|
||||
@@ -89,7 +100,7 @@ file(GET_RUNTIME_DEPENDENCIES
|
||||
RESOLVED_DEPENDENCIES_VAR _resolved_dependencies
|
||||
UNRESOLVED_DEPENDENCIES_VAR _unresolved_dependencies
|
||||
CONFLICTING_DEPENDENCIES_PREFIX _conflicts
|
||||
EXECUTABLES "${BUNDLE_RESOLVER_EXECUTABLE}"
|
||||
EXECUTABLES ${BUNDLE_RESOLVER_EXECUTABLES}
|
||||
LIBRARIES ${BUNDLE_RESOLVER_LIBRARIES}
|
||||
DIRECTORIES ${BUNDLE_SEARCH_DIRECTORIES}
|
||||
PRE_EXCLUDE_REGEXES
|
||||
@@ -184,14 +195,23 @@ foreach(_entry IN LISTS _library_entries)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
execute_process(
|
||||
COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath "$ORIGIN/../lib" "${_executable}"
|
||||
RESULT_VARIABLE _patch_executable_result
|
||||
ERROR_VARIABLE _patch_executable_error)
|
||||
if(NOT _patch_executable_result EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Cannot set RUNPATH on ${_executable}: ${_patch_executable_error}")
|
||||
endif()
|
||||
file(GLOB _bundle_executable_entries LIST_DIRECTORIES FALSE
|
||||
"${_bundle_root}/bin/*")
|
||||
list(SORT _bundle_executable_entries)
|
||||
foreach(_entry IN LISTS _bundle_executable_entries)
|
||||
_echoion_is_elf("${_entry}" _is_elf)
|
||||
if(NOT _is_elf)
|
||||
continue()
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND "${PATCHELF_EXECUTABLE}" --set-rpath "$ORIGIN/../lib" "${_entry}"
|
||||
RESULT_VARIABLE _patch_executable_result
|
||||
ERROR_VARIABLE _patch_executable_error)
|
||||
if(NOT _patch_executable_result EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Cannot set RUNPATH on ${_entry}: ${_patch_executable_error}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(LENGTH _resolved_dependencies _dependency_count)
|
||||
message(STATUS "Bundled ${_dependency_count} resolved runtime dependencies")
|
||||
@@ -0,0 +1,8 @@
|
||||
# Immutable dependency revisions used by clean and release builds. Local
|
||||
# development may still override either package with CPM_<name>_SOURCE.
|
||||
set(ECHOION_VOID_REVISION
|
||||
"053ee5b296d1f41b0653b4301bbea1e857be2279"
|
||||
CACHE STRING "VoidLibrary commit used by Echoion")
|
||||
set(ECHOION_VOID_TEAMSPEAK_REVISION
|
||||
"cb43116da643fb6584f91f108f384cc5e3cb658c"
|
||||
CACHE STRING "VoidTeamspeak commit used by Echoion")
|
||||
Reference in new issue
Block a user