setup-msbuild icon indicating copy to clipboard operation
setup-msbuild copied to clipboard

Shifting Mtcnn_ncnn to other code and use other C++ file over it.

Open ankittecholution opened this issue 5 years ago • 5 comments

I was trying to Shift the code to one of my project which has a c++ file but was not able to do that as a project can't have more then one cmake fie so I was not able to do so if anyone has a solution to it please help me out. Any help will be great.

ankittecholution avatar Sep 30 '19 11:09 ankittecholution

which c++ file?

moli232777144 avatar Sep 30 '19 11:09 moli232777144

I was trying to implement object tracking over it. for tracking faces.

ankittecholution avatar Sep 30 '19 11:09 ankittecholution

add c++ file path to cmakeList.txt

moli232777144 avatar Sep 30 '19 11:09 moli232777144

This is the cmake file for object tracking ` cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on)

project(TSAS)

add_subdirectory(tensorflow_demo)`

This is cmake file inside tensoreflow_demo `project(TENSORFLOW_DEMO)

get_filename_component(SRC_DIR ${CMAKE_SOURCE_DIR}/.. ABSOLUTE)

if (ANDROID_ABI MATCHES "^armeabi-v7a$") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=softfp -mfpu=neon") elseif(ANDROID_ABI MATCHES "^arm64-v8a") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ftree-vectorize") endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTANDALONE_DEMO_LIB
-std=c++11 -fno-exceptions -fno-rtti -O2 -Wno-narrowing
-fPIE") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}
-Wl,--allow-multiple-definition
-Wl,--whole-archive -fPIE -v")

file(GLOB_RECURSE tensorflow_demo_sources ${SRC_DIR}/jni/tensorflow_demo/.) add_library(tensorflow_demo SHARED ${tensorflow_demo_sources}) target_include_directories(tensorflow_demo PRIVATE ${CMAKE_SOURCE_DIR})

target_link_libraries(tensorflow_demo android log jnigraphics m atomic z) `

ankittecholution avatar Sep 30 '19 11:09 ankittecholution

When I include this into mtcnn cmake there is an error and if I put mtcnn cmake file there is an error that we mtcnn source file not found.

ankittecholution avatar Sep 30 '19 11:09 ankittecholution