2017-06-20 20:19:43 +08:00
|
|
|
set(the_description "All OpenCV modules")
|
2012-05-13 17:34:33 +08:00
|
|
|
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
|
|
|
set(BUILD_opencv_world_INIT OFF)
|
2012-06-10 00:18:39 +08:00
|
|
|
|
2017-01-21 00:16:01 +08:00
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
2012-06-15 15:52:20 +08:00
|
|
|
set(OPENCV_MODULE_TYPE STATIC)
|
|
|
|
set(OPENCV_WORLD_FLAGS_PROPERTY STATIC_LIBRARY_FLAGS)
|
|
|
|
else()
|
|
|
|
set(OPENCV_WORLD_FLAGS_PROPERTY LINK_FLAGS)
|
2012-06-10 00:18:39 +08:00
|
|
|
endif()
|
2012-05-12 21:54:26 +08:00
|
|
|
|
2015-04-09 00:16:06 +08:00
|
|
|
function(include_one_module m)
|
|
|
|
include("${OPENCV_MODULE_${m}_LOCATION}/CMakeLists.txt")
|
2017-01-16 23:12:38 +08:00
|
|
|
foreach(var
|
|
|
|
CMAKE_CXX_FLAGS CMAKE_C_FLAGS # Propagate warnings settings
|
|
|
|
)
|
|
|
|
set(${var} "${${var}}" PARENT_SCOPE)
|
|
|
|
endforeach()
|
2015-04-09 00:16:06 +08:00
|
|
|
endfunction()
|
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
if(NOT OPENCV_INITIAL_PASS)
|
2016-01-16 00:43:24 +08:00
|
|
|
set(ENABLE_PRECOMPILED_HEADERS OFF CACHE INTERNAL "" FORCE)
|
2014-08-01 22:11:20 +08:00
|
|
|
project(opencv_world)
|
|
|
|
|
|
|
|
message(STATUS "Processing WORLD modules...")
|
|
|
|
foreach(m ${OPENCV_MODULES_BUILD})
|
2017-03-22 19:46:34 +08:00
|
|
|
set(the_module ${m})
|
2014-08-01 22:11:20 +08:00
|
|
|
if(OPENCV_MODULE_${m}_IS_PART_OF_WORLD)
|
|
|
|
message(STATUS " module ${m}...")
|
2016-01-14 21:59:33 +08:00
|
|
|
set(CMAKE_CURRENT_SOURCE_DIR "${OPENCV_MODULE_${m}_LOCATION}")
|
2014-08-01 22:11:20 +08:00
|
|
|
#add_subdirectory("${OPENCV_MODULE_${m}_LOCATION}" ${CMAKE_CURRENT_BINARY_DIR}/${m})
|
2015-04-09 00:16:06 +08:00
|
|
|
include_one_module(${m})
|
2014-08-01 22:11:20 +08:00
|
|
|
endif()
|
2012-05-13 17:34:33 +08:00
|
|
|
endforeach()
|
2014-08-01 22:11:20 +08:00
|
|
|
message(STATUS "Processing WORLD modules... DONE")
|
2016-01-14 21:59:33 +08:00
|
|
|
set(CMAKE_CURRENT_SOURCE_DIR "${OPENCV_MODULE_opencv_world_LOCATION}")
|
2012-05-12 21:54:26 +08:00
|
|
|
endif()
|
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_add_module(world opencv_core)
|
2012-05-12 21:54:26 +08:00
|
|
|
|
2018-02-01 21:30:23 +08:00
|
|
|
set(headers_list)
|
|
|
|
set(sources_list)
|
2014-08-01 22:11:20 +08:00
|
|
|
set(link_deps "")
|
2017-01-16 23:12:38 +08:00
|
|
|
foreach(m ${OPENCV_MODULE_${the_module}_DEPS} opencv_world)
|
2015-06-05 21:24:38 +08:00
|
|
|
if(OPENCV_MODULE_${m}_IS_PART_OF_WORLD)
|
2018-02-01 21:30:23 +08:00
|
|
|
list(APPEND headers_list ${OPENCV_MODULE_${m}_HEADERS})
|
|
|
|
list(APPEND sources_list ${OPENCV_MODULE_${m}_SOURCES})
|
2015-06-05 21:24:38 +08:00
|
|
|
endif()
|
2017-01-16 23:12:38 +08:00
|
|
|
if(NOT " ${OPENCV_MODULE_${m}_LINK_DEPS}" STREQUAL " ")
|
|
|
|
list(APPEND link_deps ${OPENCV_MODULE_${m}_LINK_DEPS})
|
|
|
|
endif()
|
2012-05-12 21:54:26 +08:00
|
|
|
endforeach()
|
|
|
|
|
2018-02-01 21:30:23 +08:00
|
|
|
ocv_glob_module_sources(HEADERS ${headers_list} SOURCES ${sources_list})
|
2013-03-25 00:07:55 +08:00
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_module_include_directories()
|
2013-03-25 00:07:55 +08:00
|
|
|
|
2014-08-01 22:11:20 +08:00
|
|
|
#message(STATUS "${OPENCV_MODULE_${the_module}_HEADERS}")
|
|
|
|
#message(STATUS "${OPENCV_MODULE_${the_module}_SOURCES}")
|
|
|
|
ocv_create_module(${link_deps})
|
2013-08-21 20:44:09 +08:00
|
|
|
|
2017-10-11 21:19:29 +08:00
|
|
|
ocv_target_compile_definitions(${the_module} PRIVATE OPENCV_MODULE_IS_PART_OF_WORLD=1)
|
|
|
|
|
2014-12-05 22:48:28 +08:00
|
|
|
if(BUILD_opencv_imgcodecs AND OPENCV_MODULE_opencv_imgcodecs_IS_PART_OF_WORLD)
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_imgcodecs_configure_target()
|
2013-08-21 20:44:09 +08:00
|
|
|
endif()
|
2014-12-05 22:48:28 +08:00
|
|
|
if(BUILD_opencv_highgui AND OPENCV_MODULE_opencv_highgui_IS_PART_OF_WORLD)
|
2014-08-01 22:11:20 +08:00
|
|
|
ocv_highgui_configure_target()
|
2012-05-12 21:54:26 +08:00
|
|
|
endif()
|