|
@@ -38,9 +38,9 @@ macro(ocv_glob_modules modulepath)
|
|
|
|
|
|
|
|
|
|
|
|
- get_filename_component(currDirName ${modulepath} NAME )
|
|
|
- set(the_module "${the_module}_${currDirName}")
|
|
|
- message(STATUS "currDirName=${currDirName}")
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -60,7 +60,7 @@ macro(ocv_glob_modules modulepath)
|
|
|
foreach(mod ${__ocvmodules})
|
|
|
ocv_get_real_path(__modpath "${__path}/${mod}")
|
|
|
if(EXISTS "${__modpath}/CMakeLists.txt")
|
|
|
- message(STATUS "${__modpath} adding subdir")
|
|
|
+
|
|
|
list(FIND __directories_observed "${__modpath}" __pathIdx)
|
|
|
if(__pathIdx GREATER -1)
|
|
|
message(FATAL_ERROR "The module from ${__modpath} is already loaded.")
|
|
@@ -281,8 +281,8 @@ macro(ocv_glob_module_sources)
|
|
|
|
|
|
|
|
|
file(GLOB lib_hdrs "*.hpp" "*.h" "*.tcc")
|
|
|
- message(status "lib_srcs: ${lib_srcs}")
|
|
|
- message(status "lib_hdrs: ${lib_hdrs}")
|
|
|
+
|
|
|
+
|
|
|
source_group("Src" FILES ${lib_srcs})
|
|
|
source_group("Include" FILES ${lib_hdrs})
|
|
|
ocv_set_module_sources(${ARGN} HEADERS ${lib_hdrs} SOURCES ${lib_srcs})
|
|
@@ -306,18 +306,20 @@ macro(ocv_create_module)
|
|
|
foreach(currSubDir ${__listSubdirs})
|
|
|
ocv_get_real_path(__subdirpath "${__path}/${currSubDir}")
|
|
|
|
|
|
- message(STATUS "subdir examining: ${__subdirpath}")
|
|
|
+
|
|
|
if(EXISTS "${__subdirpath}/CMakeLists.txt")
|
|
|
- message(STATUS "has CMakeLists.txt")
|
|
|
+ message(STATUS "${currSubDir} has CMakeLists.txt")
|
|
|
if ( "${currSubDir}" STREQUAL "tests" )
|
|
|
if( NICE_BUILD_TESTS )
|
|
|
|
|
|
+
|
|
|
else()
|
|
|
message(STATUS "by configuration: tests/ not added")
|
|
|
endif()
|
|
|
elseif( "${currSubDir}" STREQUAL "progs" )
|
|
|
if( NICE_BUILD_PROGS )
|
|
|
|
|
|
+ add_subdirectory("${__subdirpath}")
|
|
|
else()
|
|
|
message(STATUS "by configuration: progs/ not added")
|
|
|
endif()
|
|
@@ -325,11 +327,11 @@ macro(ocv_create_module)
|
|
|
message(STATUS "adding subdir")
|
|
|
add_subdirectory("${__subdirpath}")
|
|
|
|
|
|
- message(STATUS "subdir-sources: ${OPENCV_MODULE_${the_module}_${currSubDir}_SOURCES}")
|
|
|
+
|
|
|
set(OPENCV_MODULE_${the_module}_SOURCES "${OPENCV_MODULE_${the_module}_SOURCES}" "${OPENCV_MODULE_${the_module}_${currSubDir}_SOURCES}")
|
|
|
set(OPENCV_MODULE_${the_module}_HEADERS "${OPENCV_MODULE_${the_module}_HEADERS}" "${OPENCV_MODULE_${the_module}_${currSubDir}_HEADERS}")
|
|
|
- message(STATUS "accumulated sources of ${the_module}: ${OPENCV_MODULE_${the_module}_SOURCES}")
|
|
|
- message(STATUS "accumulated headers of ${the_module}: ${OPENCV_MODULE_${the_module}_HEADERS}")
|
|
|
+
|
|
|
+
|
|
|
endif()
|
|
|
endif()
|
|
|
endforeach()
|
|
@@ -338,8 +340,8 @@ macro(ocv_create_module)
|
|
|
|
|
|
|
|
|
|
|
|
- message(STATUS "linking source files of ${the_module}: ${OPENCV_MODULE_${the_module}_SOURCES}")
|
|
|
- message(STATUS "linking header files of ${the_module}: ${OPENCV_MODULE_${the_module}_HEADERS}")
|
|
|
+
|
|
|
+
|
|
|
add_library(${the_module} ${NICE_BUILD_LIBS_STATIC_SHARED} ${OPENCV_MODULE_${the_module}_HEADERS} ${OPENCV_MODULE_${the_module}_SOURCES})
|
|
|
|
|
|
if(NOT "${ARGN}" STREQUAL "SKIP_LINK")
|