Skip to content

Commit 5340dc6

Browse files
committed
Merge pull request #19819 from alalek:cmake_fix_headers_order
2 parents 1615afd + 2b86de2 commit 5340dc6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cmake/OpenCVModule.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ endmacro()
876876
macro(_ocv_create_module)
877877

878878
ocv_compiler_optimization_process_sources(OPENCV_MODULE_${the_module}_SOURCES OPENCV_MODULE_${the_module}_DEPS_EXT ${the_module})
879-
set(OPENCV_MODULE_${the_module}_HEADERS ${OPENCV_MODULE_${the_module}_HEADERS} CACHE INTERNAL "List of header files for ${the_module}")
879+
set(__module_headers ${OPENCV_MODULE_${the_module}_HEADERS})
880+
list(SORT __module_headers) # fix headers order, useful for bindings
881+
set(OPENCV_MODULE_${the_module}_HEADERS ${__module_headers} CACHE INTERNAL "List of header files for ${the_module}")
880882
set(OPENCV_MODULE_${the_module}_SOURCES ${OPENCV_MODULE_${the_module}_SOURCES} CACHE INTERNAL "List of source files for ${the_module}")
881883

882884
# The condition we ought to be testing here is whether ocv_add_precompiled_headers will

0 commit comments

Comments
 (0)