From 0979a679902898871ff91fa4e0ce4f8a7cae48c4 Mon Sep 17 00:00:00 2001 From: nihui Date: Thu, 23 Jan 2020 15:48:04 +0800 Subject: [PATCH] ci opencv (#1511) --- .github/workflows/ccpp.yml | 12 ++++++------ .travis.yml | 1 + tools/quantize/CMakeLists.txt | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index a2004c580..56a784955 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: sudo apt-get install libprotobuf-dev protobuf-compiler + run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev - name: configure run: mkdir build && cd build && cmake .. - name: build @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: sudo apt-get install libprotobuf-dev protobuf-compiler + run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev - name: cache-vulkansdk id: cache-vulkansdk uses: actions/cache@v1 @@ -76,7 +76,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: sudo apt-get install libprotobuf-dev protobuf-compiler + run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev - name: configure env: CC: clang @@ -92,7 +92,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: sudo apt-get install libprotobuf-dev protobuf-compiler + run: sudo apt-get install libprotobuf-dev protobuf-compiler libopencv-dev - name: cache-vulkansdk id: cache-vulkansdk uses: actions/cache@v1 @@ -165,7 +165,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: brew install protobuf + run: brew install protobuf opencv3 - name: configure run: mkdir build && cd build && cmake .. - name: build @@ -178,7 +178,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: protobuf - run: brew install protobuf + run: brew install protobuf opencv3 - name: cache-vulkansdk id: cache-vulkansdk uses: actions/cache@v1 diff --git a/.travis.yml b/.travis.yml index b21c81853..f51223ae4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ addons: - cmake - libprotobuf-dev - protobuf-compiler + - libopencv-dev matrix: include: diff --git a/tools/quantize/CMakeLists.txt b/tools/quantize/CMakeLists.txt index 0182550ed..cf629fca7 100644 --- a/tools/quantize/CMakeLists.txt +++ b/tools/quantize/CMakeLists.txt @@ -5,8 +5,9 @@ endif() if(OpenCV_FOUND) add_executable(ncnn2table ncnn2table.cpp) - target_link_libraries(ncnn2table PRIVATE ncnn ${OpenCV_LIBS}) target_compile_definitions(ncnn2table PRIVATE -DOpenCV_VERSION_MAJOR=${OpenCV_VERSION_MAJOR}) + target_compile_options(ncnn2table PRIVATE -std=c++11) + target_link_libraries(ncnn2table PRIVATE ncnn ${OpenCV_LIBS}) add_executable(ncnn2int8 ncnn2int8.cpp) target_link_libraries(ncnn2int8 PRIVATE ncnn)