34 lines
982 B
CMake
34 lines
982 B
CMake
# 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(deezcryptor VERSION 0.0.1 LANGUAGES C)
|
|
|
|
SET(OPENSSL_ROOT_DIR openssl)
|
|
|
|
SET(OPENSSL_LIBRARIES_DIR "lib/${ANDROID_ABI}")
|
|
SET(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include)
|
|
SET(OPENSSL_LIBRARIES "ssl" "crypto")
|
|
|
|
set(OPENSSL_USE_STATIC_LIBS TRUE)
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
target_link_libraries(deezcryptor OpenSSL::Crypto)
|
|
|
|
LINK_DIRECTORIES(${OPENSSL_LIBRARIES_DIR})
|
|
|
|
add_library(deezcryptor SHARED
|
|
"deezcryptor.c"
|
|
)
|
|
|
|
set_target_properties(deezcryptor PROPERTIES
|
|
PUBLIC_HEADER deezcryptor.h
|
|
OUTPUT_NAME "deezcryptor"
|
|
)
|
|
|
|
TARGET_INCLUDE_DIRECTORIES(deezcryptor PUBLIC ${OPENSSL_INCLUDE_DIR})
|
|
TARGET_LINK_LIBRARIES(deezcryptor ${OPENSSL_LIBRARIES})
|
|
|
|
target_compile_definitions(deezcryptor PUBLIC DART_SHARED_LIB)
|