2019-12-27 22:16:57 +08:00
|
|
|
file(GLOB_RECURSE MNN_EXPR_SRCS "${CMAKE_CURRENT_LIST_DIR}/*.cpp")
|
2020-01-17 10:20:15 +08:00
|
|
|
option(MNN_EXPR_ENABLE_PROFILER "Support profile Expr's op cost" OFF)
|
|
|
|
|
IF (MNN_EXPR_ENABLE_PROFILER)
|
|
|
|
|
add_definitions(-DMNN_EXPR_ENABLE_PROFILER)
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(MNN_SEP_BUILD)
|
2020-02-26 09:57:17 +08:00
|
|
|
if (MNN_BUILD_FOR_ANDROID_COMMAND)
|
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "../")
|
|
|
|
|
endif()
|
2020-01-17 10:20:15 +08:00
|
|
|
add_library(MNN_Express SHARED ${MNN_EXPR_SRCS})
|
|
|
|
|
target_link_libraries(MNN_Express MNN)
|
|
|
|
|
ELSE()
|
|
|
|
|
add_library(MNNExpress OBJECT ${MNN_EXPR_SRCS})
|
|
|
|
|
ENDIF()
|