Johannes Ruehle 11 жил өмнө
parent
commit
81ed76097e
4 өөрчлөгдсөн 124 нэмэгдсэн , 0 устгасан
  1. 71 0
      CMakeLists.txt
  2. 32 0
      corefiles.cmake
  3. 15 0
      progfiles.cmake
  4. 6 0
      testfiles.cmake

+ 71 - 0
CMakeLists.txt

@@ -0,0 +1,71 @@
+####################################################
+## library individual settings
+
+#library name (name is appended to "nice_" to form the target library name)
+set(the_library "semseg")
+
+#define variable nice_<libname>_HDR and nice_<libname>_SRC for library header and source files (don't include progs and test source files here)
+include( corefiles.cmake)
+
+#define variable nice_<libname>_PROGFILES_HDR and nice_<libname>_PROGFILES_SRC for program header and source files (don't include library and test source files here)
+include( progfiles.cmake)
+
+#define variable nice_<libname>_TESTFILES_HDR and nice_<libname>_TESTFILES_SRC for unit test header and source files (don't include library and progs source files here)
+include( testfiles.cmake)	
+
+#add linkage dependencies to other libraries here
+set("nice_${the_library}_LINKING_DEPENDENCIES" "nice_core" "nice_vislearning" "nice_gp-hik-core" "nice_segmentation" "nice_gp-hik-exp")
+
+#####################################################
+message(STATUS "adding library ${the_library}")
+
+nice_build_library()
+
+nice_add_progs()
+
+nice_add_unittests()
+
+#####
+ set(the_module "nice_${the_library}")
+ if(ENABLE_SOLUTION_FOLDERS)
+    set_target_properties(${the_module} PROPERTIES FOLDER "modules")
+  endif()
+	
+  set_target_properties(${the_module} PROPERTIES
+    OUTPUT_NAME "${the_module}${OPENCV_DLLVERSION}"
+    DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
+    ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+    RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+    INSTALL_NAME_DIR lib
+  )
+  
+  if(BUILD_SHARED_LIBS)
+    if(MSVC)
+      set_target_properties(${the_module} PROPERTIES DEFINE_SYMBOL CVAPI_EXPORTS)
+    else()
+      add_definitions(-DCVAPI_EXPORTS)
+    endif()
+  endif()
+
+  if(MSVC)
+    if(CMAKE_CROSSCOMPILING)
+      set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:secchk")
+    endif()
+    set_target_properties(${the_module} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:libc /DEBUG")
+  endif()
+
+  install(TARGETS ${the_module}
+    RUNTIME DESTINATION bin COMPONENT main
+    LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
+    ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
+    )
+
+#   # only "public" headers need to be installed
+#   if(OPENCV_MODULE_${the_module}_HEADERS AND ";${OPENCV_MODULES_PUBLIC};" MATCHES ";${the_module};")
+#     foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS})
+#       string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
+#       if(hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
+#         install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT main)
+#       endif()
+#     endforeach()
+#   endif()

+ 32 - 0
corefiles.cmake

@@ -0,0 +1,32 @@
+SET(nice_semseg_SRC
+./semseg/SemSegNovelty.cpp
+./semseg/SemSegTools.cpp
+./semseg/operations/Operations.cpp
+./semseg/postsegmentation/PSSImageLevelPrior.cpp
+./semseg/postsegmentation/PPSuperregion.cpp
+./semseg/postsegmentation/RelativeLocationPrior.cpp
+./semseg/postsegmentation/PostSemSeg.cpp
+./semseg/postsegmentation/PPGraphCut.cpp
+./semseg/SemSegCsurka.cpp
+./semseg/SemSegNoveltyBinary.cpp
+./semseg/SemSegContextTree.cpp
+./semseg/SemSegLocal.cpp
+./semseg/SemanticSegmentation.cpp
+)
+
+SET(nice_semseg_HDR
+./semseg/SemSegCsurka.h
+./semseg/SemSegLocal.h
+./semseg/SemSegTools.h
+./semseg/SemSegContextTree.h
+./semseg/operations/Operations.h
+./semseg/postsegmentation/PPSuperregion.h
+./semseg/postsegmentation/PostSemSeg.h
+./semseg/postsegmentation/PSSImageLevelPrior.h
+./semseg/postsegmentation/PPGraphCut.h
+./semseg/postsegmentation/RelativeLocationPrior.h
+./semseg/SemSegNovelty.h
+./semseg/SemSegNoveltyBinary.h
+./semseg/SemanticSegmentation.h
+)
+

+ 15 - 0
progfiles.cmake

@@ -0,0 +1,15 @@
+# find . -name "*.cpp" -ipath "*/progs/*" > progfiles.cmake.t
+set(nice_semseg_PROGFILES_SRC 
+./progs/testActiveSemanticSegmentation.cpp
+./progs/testNICE.cpp
+./progs/testClassifierGMM.cpp
+./progs/testRF.cpp
+./progs/testActiveSemanticSegmentationBinary.cpp
+./progs/testClassifier.cpp
+./progs/testSemanticSegmentation.cpp
+./progs/classtest.cpp
+./progs/getRelevantClasses.cpp
+)
+
+set(nice_semseg_PROGFILES_HDR
+)

+ 6 - 0
testfiles.cmake

@@ -0,0 +1,6 @@
+#generated by find . -name "*.cpp" -ipath "*/tests/*" > testfiles.cmake.t 
+SET(nice_semseg_TESTFILES_SRC 
+)
+
+SET(nice_semseg_TESTFILES_HDR
+)