forked from cunarist/rinf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add elinux support for packages
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# The Flutter tooling requires that developers have CMake 3.10 or later | ||
# installed. You should not increase this version, as doing so will cause | ||
# the plugin to fail to compile for some customers of the plugin. | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
# Project-level configuration. | ||
set(PROJECT_NAME "rinf") | ||
project(${PROJECT_NAME} LANGUAGES CXX) | ||
|
||
# Invoke the build for native code shared with the other target platforms. | ||
# This can be changed to accommodate different builds. | ||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../src" "${CMAKE_CURRENT_BINARY_DIR}/shared") | ||
|
||
# List of absolute paths to libraries that should be bundled with the plugin. | ||
# This list could contain prebuilt libraries, or libraries created by an | ||
# external build triggered from this build file. | ||
set(rinf_bundled_libraries | ||
# Defined in ../src/CMakeLists.txt. | ||
# This can be changed to accommodate different builds. | ||
$<TARGET_FILE:rinf> | ||
PARENT_SCOPE | ||
) | ||
|
||
# Include the CMake build file of the Rust code. | ||
include(./rust.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
cmake_policy(SET CMP0079 NEW) | ||
apply_standard_settings(${BINARY_NAME}) | ||
|
||
set_target_properties( | ||
${BINARY_NAME} PROPERTIES | ||
CXX_VISIBILITY_PRESET hidden | ||
BUILD_RPATH_USE_ORIGIN ON | ||
) | ||
|
||
target_compile_definitions(${BINARY_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) | ||
target_link_libraries(${BINARY_NAME} PRIVATE flutter) | ||
|
||
include("../cargokit/cmake/cargokit.cmake") | ||
apply_cargokit(${BINARY_NAME} ${CMAKE_SOURCE_DIR}/../native/hub hub "") | ||
|
||
set( | ||
rinf_bundled_libraries | ||
"${${BINARY_NAME}_cargokit_lib}" | ||
PARENT_SCOPE | ||
) |