diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f3545ad2..a34eb0ea4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.9) project(MTTracking VERSION 1.1.0) +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + unset(CMAKE_C_FLAGS CACHE) unset(CMAKE_CXX_FLAGS CACHE) unset(CMAKE_CXX_FLAGS_RELEASE CACHE) diff --git a/async_detector/CMakeLists.txt b/async_detector/CMakeLists.txt index 524165e45..7584a3c3c 100644 --- a/async_detector/CMakeLists.txt +++ b/async_detector/CMakeLists.txt @@ -2,34 +2,26 @@ cmake_minimum_required (VERSION 3.5) project(AsyncDetector) -set(SOURCES - main.cpp - AsyncDetector.cpp -) +set(SOURCES main.cpp + AsyncDetector.cpp) -set(HEADERS - AsyncDetector.h - Queue.h -) +set(HEADERS AsyncDetector.h + Queue.h) # ---------------------------------------------------------------------------- # добавляем include директории # ---------------------------------------------------------------------------- -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/../src +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/../src ${PROJECT_SOURCE_DIR}/../src/common ${PROJECT_SOURCE_DIR}/../src/Detector ${PROJECT_SOURCE_DIR}/../src/Detector/vibe_src ${PROJECT_SOURCE_DIR}/../src/Detector/Subsense ${PROJECT_SOURCE_DIR}/../src/Tracker - ${PROJECT_SOURCE_DIR}/../src/Tracker/HungarianAlg -) - -set(LIBS - ${OpenCV_LIBS} - mtracking - mdetection -) + ${PROJECT_SOURCE_DIR}/../src/Tracker/HungarianAlg) + +set(LIBS ${OpenCV_LIBS} + mtracking + mdetection) if (BUILD_YOLO_LIB) if (MSVC) @@ -49,3 +41,5 @@ ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES} ${HEADERS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} PRIVATE ${LIBS}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "apps") \ No newline at end of file diff --git a/combined/CMakeLists.txt b/combined/CMakeLists.txt index eb773e519..f2ba4ba37 100644 --- a/combined/CMakeLists.txt +++ b/combined/CMakeLists.txt @@ -6,21 +6,17 @@ set(SOURCES main.cpp combined.cpp) set(HEADERS combined.h) -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/../src +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/../src ${PROJECT_SOURCE_DIR}/../src/common ${PROJECT_SOURCE_DIR}/../src/Detector ${PROJECT_SOURCE_DIR}/../src/Detector/vibe_src ${PROJECT_SOURCE_DIR}/../src/Detector/Subsense ${PROJECT_SOURCE_DIR}/../src/Tracker - ${PROJECT_SOURCE_DIR}/../src/Tracker/HungarianAlg -) + ${PROJECT_SOURCE_DIR}/../src/Tracker/HungarianAlg) -set(LIBS - ${OpenCV_LIBS} - mtracking - mdetection -) +set(LIBS ${OpenCV_LIBS} + mtracking + mdetection) if (BUILD_YOLO_LIB) if (MSVC) @@ -43,3 +39,5 @@ endif(BUILD_YOLO_TENSORRT) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES} ${HEADERS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "apps") \ No newline at end of file diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 0d9c00848..19cd45421 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -2,17 +2,13 @@ cmake_minimum_required (VERSION 3.5) project(MultitargetTracker) -set(SOURCES - main.cpp - VideoExample.cpp -) +set(SOURCES main.cpp + VideoExample.cpp) -set(HEADERS - MouseExample.h - VideoExample.h - examples.h - FileLogger.h -) +set(HEADERS MouseExample.h + VideoExample.h + examples.h + FileLogger.h) if (BUILD_CARS_COUNTING) set(SOURCES ${SOURCES} CarsCounting.cpp) @@ -22,23 +18,19 @@ endif(BUILD_CARS_COUNTING) # ---------------------------------------------------------------------------- # добавляем include директории # ---------------------------------------------------------------------------- -INCLUDE_DIRECTORIES( - ${PROJECT_SOURCE_DIR}/../src +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/../src ${PROJECT_SOURCE_DIR}/../src/common ${PROJECT_SOURCE_DIR}/../src/Detector ${PROJECT_SOURCE_DIR}/../src/Detector/vibe_src ${PROJECT_SOURCE_DIR}/../src/Detector/Subsense ${PROJECT_SOURCE_DIR}/../src/Tracker ${PROJECT_SOURCE_DIR}/../src/Tracker/HungarianAlg - ${PROJECT_SOURCE_DIR}/../thirdparty -) + ${PROJECT_SOURCE_DIR}/../thirdparty) -set(LIBS - ${OpenCV_LIBS} - mtracking - mdetection - inih -) +set(LIBS ${OpenCV_LIBS} + mtracking + mdetection + inih) if (BUILD_YOLO_LIB) if (MSVC) @@ -66,3 +58,5 @@ endif(BUILD_CARS_COUNTING) ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES} ${HEADERS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} PRIVATE ${LIBS}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "apps") \ No newline at end of file diff --git a/src/Detector/CMakeLists.txt b/src/Detector/CMakeLists.txt index 46311d043..ae5ffd880 100644 --- a/src/Detector/CMakeLists.txt +++ b/src/Detector/CMakeLists.txt @@ -112,3 +112,5 @@ install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file diff --git a/src/Detector/darknet/CMakeLists.txt b/src/Detector/darknet/CMakeLists.txt index 19fd7dca1..26c2185f9 100644 --- a/src/Detector/darknet/CMakeLists.txt +++ b/src/Detector/darknet/CMakeLists.txt @@ -118,3 +118,5 @@ if (MSVC) install(FILES "${LINK_DIRECTORY}/${LIB_PTHREAD}.lib" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) endif() + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file diff --git a/src/Detector/tensorrt_yolo/CMakeLists.txt b/src/Detector/tensorrt_yolo/CMakeLists.txt index b8126440c..30509d0e6 100644 --- a/src/Detector/tensorrt_yolo/CMakeLists.txt +++ b/src/Detector/tensorrt_yolo/CMakeLists.txt @@ -89,3 +89,5 @@ install(TARGETS ${libname_rt} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file diff --git a/src/Tracker/CMakeLists.txt b/src/Tracker/CMakeLists.txt index a1c47b8c1..a7ad2bced 100644 --- a/src/Tracker/CMakeLists.txt +++ b/src/Tracker/CMakeLists.txt @@ -229,3 +229,5 @@ install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file diff --git a/thirdparty/inih/CMakeLists.txt b/thirdparty/inih/CMakeLists.txt index 7fd9a15c1..bdb1a93b8 100644 --- a/thirdparty/inih/CMakeLists.txt +++ b/thirdparty/inih/CMakeLists.txt @@ -17,3 +17,4 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file diff --git a/thirdparty/pybind11/CMakeLists.txt b/thirdparty/pybind11/CMakeLists.txt index 85ecd9028..97ee24867 100644 --- a/thirdparty/pybind11/CMakeLists.txt +++ b/thirdparty/pybind11/CMakeLists.txt @@ -155,3 +155,5 @@ if (PYBIND11_INSTALL) endif() endif() endif() + +set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "libs") \ No newline at end of file