-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from iwatake2222/feat/contain_prebuilt_libs
Feat/contain prebuilt libs
- Loading branch information
Showing
17 changed files
with
281 additions
and
52 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.vscode/ | ||
build/ | ||
ThirdParty/ | ||
third_party/ | ||
resource/ |
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,3 @@ | ||
[submodule "ThirdParty/tensorflow"] | ||
path = ThirdParty/tensorflow | ||
url = https://github.com/tensorflow/tensorflow |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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,35 @@ | ||
if(DEFINED ANDROID_ABI) | ||
# set(MNN_LIB ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/android/${ANDROID_ABI}/libMNN.so) | ||
add_library(MNN SHARED IMPORTED GLOBAL) | ||
set_target_properties( | ||
MNN | ||
PROPERTIES IMPORTED_LOCATION | ||
${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/android/${ANDROID_ABI}/lib/libMNN.so | ||
) | ||
set(MNN_LIB MNN) | ||
set(MNN_INC ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/android/${ANDROID_ABI}/include) | ||
elseif(MSVC_VERSION) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/Debug/MNN.dll DESTINATION ${CMAKE_BINARY_DIR}/Debug) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/RelWithDebInfo/MNN.dll DESTINATION ${CMAKE_BINARY_DIR}/RelWithDebInfo) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/Release/MNN.dll DESTINATION ${CMAKE_BINARY_DIR}/Release) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/MinSizeRel/MNN.dll DESTINATION ${CMAKE_BINARY_DIR}/MinSizeRel) | ||
# file(COPY ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/MNNd.dll DESTINATION ${CMAKE_BINARY_DIR}) | ||
set(MNN_LIB | ||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/Debug/MNN.lib> | ||
$<$<CONFIG:RelWithDebInfo>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/RelWithDebInfo/MNN.lib> | ||
$<$<CONFIG:Release>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/Release/MNN.lib> | ||
$<$<CONFIG:MinSizeRel>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/lib/MinSizeRel/MNN.lib> | ||
) | ||
set(MNN_INC ${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_windows/VS2017/include) | ||
else() | ||
set(MNN_LIB | ||
$<$<STREQUAL:${BUILD_SYSTEM},x64_linux>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_linux/lib/libMNN.so> | ||
$<$<STREQUAL:${BUILD_SYSTEM},armv7>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/armv7/lib/libMNN.so> | ||
$<$<STREQUAL:${BUILD_SYSTEM},aarch64>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/aarch64/lib/libMNN.so> | ||
) | ||
set(MNN_INC | ||
$<$<STREQUAL:${BUILD_SYSTEM},x64_linux>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/x64_linux/include> | ||
$<$<STREQUAL:${BUILD_SYSTEM},armv7>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/armv7/include> | ||
$<$<STREQUAL:${BUILD_SYSTEM},aarch64>:${CMAKE_CURRENT_LIST_DIR}/../MNN_prebuilt/aarch64/include> | ||
) | ||
endif() |
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,23 @@ | ||
if(DEFINED ANDROID_ABI) | ||
set(NCNN_LIB ${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/android/${ANDROID_ABI}/lib/libncnn.a) | ||
set(NCNN_INC ${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/android/${ANDROID_ABI}/include/ncnn) | ||
elseif(MSVC_VERSION) | ||
set(NCNN_LIB | ||
$<$<CONFIG:Debug>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_windows/lib/ncnnd.lib> | ||
$<$<CONFIG:RelWithDebInfo>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_windows/lib/ncnnRelWithDebInfo.lib> | ||
$<$<CONFIG:Release>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_windows/lib/ncnn.lib> | ||
$<$<CONFIG:MinSizeRel>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_windows/lib/ncnnMinSizeRel.lib> | ||
) | ||
set(NCNN_INC ${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_windows/include/ncnn) | ||
else() | ||
set(NCNN_LIB | ||
$<$<STREQUAL:${BUILD_SYSTEM},x64_linux>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_linux/lib/libncnn.a> | ||
$<$<STREQUAL:${BUILD_SYSTEM},armv7>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/armv7/lib/libncnn.a> | ||
$<$<STREQUAL:${BUILD_SYSTEM},aarch64>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/aarch64/lib/libncnn.a> | ||
) | ||
set(NCNN_INC | ||
$<$<STREQUAL:${BUILD_SYSTEM},x64_linux>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/x64_linux/include/ncnn> | ||
$<$<STREQUAL:${BUILD_SYSTEM},armv7>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/armv7/include/ncnn> | ||
$<$<STREQUAL:${BUILD_SYSTEM},aarch64>:${CMAKE_CURRENT_LIST_DIR}/../ncnn_prebuilt/aarch64/include/ncnn> | ||
) | ||
endif() |
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,30 @@ | ||
set(TFLITE_INC | ||
${CMAKE_CURRENT_LIST_DIR}/../tensorflow | ||
${CMAKE_CURRENT_LIST_DIR}/../tensorflow/tensorflow/lite/tools/make/downloads/flatbuffers/include | ||
${CMAKE_CURRENT_LIST_DIR}/../tensorflow/tensorflow/lite/tools/make/downloads/absl | ||
) | ||
|
||
if(DEFINED ANDROID_ABI) | ||
# set(TFLITE_LIB ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/android/${ANDROID_ABI}/libtensorflowlite.so) | ||
add_library(TFLITE SHARED IMPORTED GLOBAL) | ||
set_target_properties( | ||
TFLITE | ||
PROPERTIES IMPORTED_LOCATION | ||
${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/android/${ANDROID_ABI}/libtensorflowlite.so | ||
) | ||
set(TFLITE_LIB TFLITE) | ||
elseif(MSVC_VERSION) | ||
set(TFLITE_LIB ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/x64_windows/libtensorflowlite.so.if.lib) | ||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/x64_windows/libtensorflowlite.so DESTINATION ${CMAKE_BINARY_DIR}) | ||
else() | ||
if(${BUILD_SYSTEM} STREQUAL "x64_linux") | ||
set(TFLITE_LIB ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/x64_linux/libtensorflowlite.so) | ||
elseif(${BUILD_SYSTEM} STREQUAL "armv7") | ||
set(TFLITE_LIB ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/armv7/libtensorflowlite.so) | ||
elseif(${BUILD_SYSTEM} STREQUAL "aarch64") | ||
set(TFLITE_LIB ${CMAKE_CURRENT_LIST_DIR}/../tensorflow_prebuilt/aarch64/libtensorflowlite.so) | ||
else() | ||
message(FATAL_ERROR "[tflite] unsupported platform") | ||
endif() | ||
file(COPY ${TFLITE_LIB} DESTINATION ${CMAKE_BINARY_DIR}) | ||
endif() |
Oops, something went wrong.