You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
cmake_minimum_required(VERSION 3.10) |
|
|
|
set(PROJECT_NAME argon2_ffi) |
|
set(PLUGIN_NAME ${PROJECT_NAME}_platform_plugin) |
|
|
|
project(${PROJECT_NAME} LANGUAGES CXX C) |
|
|
|
set(CMAKE_CXX_STANDARD 17) |
|
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
|
|
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-psabi") |
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fPIC") |
|
|
|
find_package(PkgConfig REQUIRED) |
|
pkg_check_modules(FlutterEmbedder REQUIRED IMPORTED_TARGET flutter-embedder) |
|
|
|
add_library(${PLUGIN_NAME} SHARED |
|
argon2_ffi_plugin.cpp |
|
|
|
../ios/Classes/argon2_ffi.c |
|
|
|
../ios/Classes/argon2src/argon2.c |
|
../ios/Classes/argon2src/core.c |
|
../ios/Classes/argon2src/encoding.c |
|
../ios/Classes/argon2src/genkat.c |
|
../ios/Classes/argon2src/ref.c |
|
../ios/Classes/argon2src/thread.c |
|
../ios/Classes/argon2src/blake2/blake2b.c |
|
) |
|
|
|
set_target_properties(${PLUGIN_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) |
|
target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::FlutterEmbedder) |
|
|
|
target_include_directories(${PLUGIN_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) |
|
target_compile_definitions(${PLUGIN_NAME} PRIVATE PLUGIN_IMPL) |
|
target_compile_definitions(${PLUGIN_NAME} PUBLIC DART_SHARED_LIB)
|
|
|