DroidFS/app/CMakeLists.txt

79 lines
1.7 KiB
CMake
Raw Permalink Normal View History

2021-10-03 14:36:06 +02:00
cmake_minimum_required(VERSION 3.10)
2020-07-17 16:35:39 +02:00
2022-06-18 21:13:16 +02:00
project(DroidFS)
2020-07-17 16:35:39 +02:00
2022-06-18 21:13:16 +02:00
option(GOCRYPTFS "build libgocryptfs" ON)
option(CRYFS "build libcryfs" ON)
2020-07-17 16:35:39 +02:00
2023-08-28 00:35:12 +02:00
add_library(memfile SHARED src/main/native/memfile.c)
target_link_libraries(memfile log)
2023-08-20 14:56:46 +02:00
2022-06-18 21:13:16 +02:00
if (GOCRYPTFS)
add_library(gocryptfs SHARED IMPORTED)
set_target_properties(
gocryptfs
PROPERTIES IMPORTED_LOCATION
${PROJECT_SOURCE_DIR}/libgocryptfs/build/${ANDROID_ABI}/libgocryptfs.so
)
add_library(gocryptfs_jni SHARED src/main/native/gocryptfs_jni.c)
target_include_directories(gocryptfs_jni PRIVATE ${PROJECT_SOURCE_DIR}/libgocryptfs/build/${ANDROID_ABI})
target_link_libraries(gocryptfs_jni gocryptfs)
endif()
2020-07-17 16:35:39 +02:00
2022-06-18 21:13:16 +02:00
if (CRYFS)
add_subdirectory(${PROJECT_SOURCE_DIR}/libcryfs)
add_library(cryfs_jni SHARED src/main/native/libcryfs.c)
target_link_libraries(cryfs_jni libcryfs-jni)
endif()
2020-07-17 16:35:39 +02:00
2021-10-03 14:36:06 +02:00
add_library(
avformat
SHARED
2021-10-03 14:36:06 +02:00
IMPORTED
)
set_target_properties(
avformat
PROPERTIES IMPORTED_LOCATION
${PROJECT_SOURCE_DIR}/ffmpeg/build/${ANDROID_ABI}/libavformat/libavformat.so
2021-10-03 14:36:06 +02:00
)
add_library(
avcodec
SHARED
2021-10-03 14:36:06 +02:00
IMPORTED
)
set_target_properties(
avcodec
PROPERTIES IMPORTED_LOCATION
${PROJECT_SOURCE_DIR}/ffmpeg/build/${ANDROID_ABI}/libavcodec/libavcodec.so
2021-10-03 14:36:06 +02:00
)
add_library(
avutil
SHARED
2021-10-03 14:36:06 +02:00
IMPORTED
)
set_target_properties(
avutil
PROPERTIES IMPORTED_LOCATION
${PROJECT_SOURCE_DIR}/ffmpeg/build/${ANDROID_ABI}/libavutil/libavutil.so
2021-10-03 14:36:06 +02:00
)
add_library(
mux
SHARED
src/main/native/libmux.c
)
2022-06-18 21:13:16 +02:00
target_include_directories(mux PRIVATE ${PROJECT_SOURCE_DIR}/ffmpeg/build/${ANDROID_ABI})
2021-10-03 14:36:06 +02:00
target_link_libraries(
mux
avformat
avcodec
avutil
log
2021-10-03 14:36:06 +02:00
)