Przeglądaj źródła

fix cmake debug build error

DevYK 3 lat temu
rodzic
commit
89fe412dcc
1 zmienionych plików z 15 dodań i 14 usunięć
  1. 15 14
      CMakeLists.txt

+ 15 - 14
CMakeLists.txt

@@ -177,28 +177,29 @@ if (CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Debug"))
     add_executable(test_md5 md5_main.cpp
             ${UTILS_SRC}
             )
+
+    add_executable(video_similarity_comparison src/video_similarity_comparison.cpp
+            ${Project_SRC}
+            ${JSON_ROOT_CPP}
+            ${FFMPEG_SRC}
+            ${UTILS_SRC}
+            )
+    target_link_libraries(video_similarity_comparison -lpthread
+            ${OpenCV_LIBS}
+            ${FFmpeg_LIBS}
+            )
 elseif (CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -O3")
     message("Release mode:${CMAKE_C_FLAGS_RELEASE}")
+    target_link_libraries(piaoquan_java_opencv -lpthread
+            ${OpenCV_LIBS}
+            ${FFmpeg_LIBS}
+            )
 else ()
     message("else:${CMAKE_BUILD_TYPE}")
     message("else:${CMAKE_C_FLAGS_RELEASE}")
 endif ()
 
-target_link_libraries(piaoquan_java_opencv -lpthread
-        ${OpenCV_LIBS}
-        ${FFmpeg_LIBS}
-        )
 
-add_executable(video_similarity_comparison src/video_similarity_comparison.cpp
-        ${Project_SRC}
-        ${JSON_ROOT_CPP}
-        ${FFMPEG_SRC}
-        ${UTILS_SRC}
-        )
-target_link_libraries(video_similarity_comparison -lpthread
-        ${OpenCV_LIBS}
-        ${FFmpeg_LIBS}
-        )