Johannes Ruehle 12 жил өмнө
parent
commit
15e2f75568

+ 7 - 7
CMakeLists.txt

@@ -50,15 +50,15 @@ FIND_PACKAGE(Qt4)
 #  ADD_DEFINITIONS( "-DNICE_USELIB_LIBMAGICK")
 #endif()
 
-#IF(WIN32)
- # MESSAGE(FATAL_ERROR "not yet ready")
-#ENDIF(WIN32) 
 
-# add the binary tree to the search path for include files
-#include_directories ("${PROJECT_BINARY_DIR}")
+set(BUILD_CORE_VECTOR ON)
+set(BUILD_CORE_BASICS ON)
+#set(BUILD_CORE_ALGEBRA ON)
+#set(BUILD_CORE_OPTIMIZATION ON)
+#set(BUILD_CORE_IMAGE ON)
+#set(BUILD_CORE_MATLABACCESS ON)
 
-#SET(CMAKE_USE_RELATIVE_PATHS ON)
-#check_symbol_exists("__assert_fail" "assert.h" HAVE_ASSERT_FAIL)
+#set(BUILD_CORE_PROGS ON)
 
 
 set(OPENCV_LIB_INSTALL_PATH lib)

+ 5 - 2
cmake/NiceModules.cmake

@@ -75,7 +75,8 @@ macro(ocv_glob_modules modulepath)
               set(OPENCV_MODULE_opencv_${mod}_LOCATION "${__modpath}" CACHE PATH "" FORCE)
             endif()
           else()
-            add_subdirectory("${__modpath}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}/.${mod}")
+            #org: add_subdirectory("${__modpath}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}/.${mod}")
+			add_subdirectory("${__modpath}" "${CMAKE_CURRENT_BINARY_DIR}/${mod}")
           endif()
         endif()
       endforeach()
@@ -353,7 +354,9 @@ macro(ocv_create_module)
   if(ENABLE_SOLUTION_FOLDERS)
     set_target_properties(${the_module} PROPERTIES FOLDER "modules")
   endif()
-
+	
+#	message(STATUS "LIBRARY_OUTPUT_PATH: ${LIBRARY_OUTPUT_PATH}")
+	#message(STATUS "EXECUTABLE_OUTPUT_PATH: ${EXECUTABLE_OUTPUT_PATH}")
   set_target_properties(${the_module} PROPERTIES
     OUTPUT_NAME "${the_module}${OPENCV_DLLVERSION}"
     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"

+ 9 - 2
core/algebra/CMakeLists.txt

@@ -1,5 +1,12 @@
-ocv_add_module(algebra)
+if(BUILD_CORE_ALGEBRA)
+ocv_add_module(algebra INTERNAL nice_core_basics)
+
+
+ocv_clear_vars(ADDITIONAL_CORE_ALGEBRA_LIBS)
+if(IPP_FOUND) #NICE_USELIB_IPP
+endif()
 
 ocv_module_include_directories()
 ocv_glob_module_sources()
-ocv_create_module()
+ocv_create_module()
+endif()

+ 3 - 0
core/algebra/progs/CMakeLists.txt

@@ -1,3 +1,4 @@
+if(BUILD_CORE_PROGS)
 
 ADD_EXECUTABLE(testILSConjugateGradients testILSConjugateGradients.cpp)
 ADD_EXECUTABLE(testILSmethods testILSmethods.cpp)
@@ -11,3 +12,5 @@ TARGET_LINK_LIBRARIES(testILSmethods nice_core ${Boost_LIBRARIES})#nice_core_alg
 INSTALL(TARGETS testILSConjugateGradients DESTINATION bin)
 INSTALL(TARGETS testILSmethods DESTINATION bin)
 #INSTALL(TARGETS testMemoryUsage DESTINATION bin)
+
+endif()

+ 3 - 1
core/basics/CMakeLists.txt

@@ -1,3 +1,4 @@
+if(BUILD_CORE_BASICS)
 #message(STATUS "vector_location: ${OPENCV_MODULE_opencv_vector_LOCATION}")
 
 ocv_add_module(basics)# ${Boost_LIBRARIES})# INTERNAL libnice_core_vector)
@@ -9,4 +10,5 @@ ocv_module_include_directories()#${Boost_INCLUDE_DIR})
 ocv_glob_module_sources()#(SOURCES ${OPENCV_MODULE_libnice_core_vector_SOURCES})
 ocv_create_module()
 
-#add_subdirectory(progs bin)
+#add_subdirectory(progs bin)
+endif()

+ 3 - 0
core/basics/progs/CMakeLists.txt

@@ -1,3 +1,4 @@
+if(BUILD_CORE_PROGS)
 
 ADD_EXECUTABLE(testConfig testConfig.cpp)
 ADD_EXECUTABLE(testMemoryUsage testMemoryUsage.cpp) 
@@ -7,3 +8,5 @@ TARGET_LINK_LIBRARIES(testMemoryUsage nice_core_basics)
 
 INSTALL(TARGETS testConfig DESTINATION bin)
 INSTALL(TARGETS testMemoryUsage DESTINATION bin)
+
+endif()

+ 31 - 1
core/image/CMakeLists.txt

@@ -1,7 +1,36 @@
+if(BUILD_CORE_IMAGE)
 #message(STATUS "vector_location: ${OPENCV_MODULE_opencv_vector_LOCATION}")
 
 ocv_add_module(image)# ${Boost_LIBRARIES})# INTERNAL libnice_core_vector)
 
+ocv_clear_vars(ADDITIONAL_CORE_IMAGE_LIBS)
+if(IMAGEMAGIC_FOUND) #NICE_USELIB_LIBMAGICK
+endif()
+
+if(WITH_PNG OR WITH_TIFF OR WITH_OPENEXR)
+  #ocv_include_directories(${ZLIB_INCLUDE_DIR})
+  #list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES})
+endif()
+
+if(WITH_JPEG)
+  #add_definitions(-DHAVE_JPEG)
+  #ocv_include_directories(${JPEG_INCLUDE_DIR})
+  #list(APPEND GRFMT_LIBS ${JPEG_LIBRARIES})
+endif()
+
+if(WITH_PNG)
+  #add_definitions(-DHAVE_PNG)
+  #add_definitions(${PNG_DEFINITIONS})
+  #ocv_include_directories(${PNG_INCLUDE_DIR})
+  #list(APPEND GRFMT_LIBS ${PNG_LIBRARIES})
+endif()
+
+if(WITH_TIFF)
+  #add_definitions(-DHAVE_TIFF)
+  #ocv_include_directories(${TIFF_INCLUDE_DIR})
+  #list(APPEND GRFMT_LIBS ${TIFF_LIBRARIES})
+endif()
+
 #message(STATUS "vector_location: ${OPENCV_MODULE_vector_LOCATION}")
 
 ocv_module_include_directories()#${Boost_INCLUDE_DIR})
@@ -9,4 +38,5 @@ ocv_module_include_directories()#${Boost_INCLUDE_DIR})
 ocv_glob_module_sources()#(SOURCES ${OPENCV_MODULE_libnice_core_vector_SOURCES})
 ocv_create_module()
 
-#add_subdirectory(progs bin)
+#add_subdirectory(progs bin)
+endif()

+ 3 - 0
core/image/progs/CMakeLists.txt

@@ -1,3 +1,4 @@
+if(BUILD_CORE_PROGS)
 
 ADD_EXECUTABLE(testApproxGaussFilter testApproxGaussFilter.cpp)
 #ADD_EXECUTABLE(testGenericSobelFilter testGenericSobelFilter.cpp)
@@ -7,3 +8,5 @@ TARGET_LINK_LIBRARIES(testApproxGaussFilter nice_core nice_core_image ${Boost_LI
 
 INSTALL(TARGETS testApproxGaussFilter DESTINATION bin)
 #INSTALL(TARGETS testGenericSobelFilter DESTINATION bin)
+
+endif()

+ 3 - 1
core/matlabAccess/CMakeLists.txt

@@ -1,5 +1,7 @@
+if(BUILD_CORE_MATLABACCESS)
 ocv_add_module(matlabAccess)
 
 ocv_module_include_directories()
 ocv_glob_module_sources()
-ocv_create_module()
+ocv_create_module()
+endif()

+ 3 - 1
core/optimization/CMakeLists.txt

@@ -1,3 +1,4 @@
+if(BUILD_CORE_OPTIMIZATION)
 #get_filename_component(currDirName ${CMAKE_CURRENT_SOURCE_DIR} NAME )
 #set(the_module "${the_module}_${currDirName}")
 
@@ -8,4 +9,5 @@ ocv_add_module(optimization)
 
 ocv_module_include_directories()
 ocv_glob_module_sources()
-ocv_create_module()
+ocv_create_module()
+endif()

+ 3 - 1
core/vector/CMakeLists.txt

@@ -1,3 +1,5 @@
+if(BUILD_CORE_VECTOR)
+
 ocv_add_module(vector)
 
 
@@ -42,5 +44,5 @@ endif()
 
 
 
-
+endif()