mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #10326 from alalek:cmake_fixes
This commit is contained in:
commit
a5c04baec1
1
3rdparty/libtiff/CMakeLists.txt
vendored
1
3rdparty/libtiff/CMakeLists.txt
vendored
@ -7,6 +7,7 @@ project(${TIFF_LIBRARY})
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckTypeSize)
|
||||
|
||||
|
||||
# Find libm, if available
|
||||
|
@ -863,6 +863,11 @@ macro(_ocv_create_module)
|
||||
ocv_target_link_libraries(${the_module} LINK_PRIVATE ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||
endif()
|
||||
|
||||
if(OPENCV_MODULE_${the_module}_COMPILE_DEFINITIONS)
|
||||
target_compile_definitions(${the_module} ${OPENCV_MODULE_${the_module}_COMPILE_DEFINITIONS})
|
||||
unset(OPENCV_MODULE_${the_module}_COMPILE_DEFINITIONS CACHE)
|
||||
endif()
|
||||
|
||||
add_dependencies(opencv_modules ${the_module})
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
|
@ -987,7 +987,14 @@ endfunction()
|
||||
|
||||
function(ocv_target_compile_definitions target)
|
||||
_ocv_fix_target(target)
|
||||
target_compile_definitions(${target} ${ARGN})
|
||||
if(NOT TARGET ${target})
|
||||
if(NOT DEFINED OPENCV_MODULE_${target}_LOCATION)
|
||||
message(FATAL_ERROR "ocv_target_compile_definitions: invalid target: '${target}'")
|
||||
endif()
|
||||
set(OPENCV_MODULE_${target}_COMPILE_DEFINITIONS ${OPENCV_MODULE_${target}_COMPILE_DEFINITIONS} ${ARGN} CACHE INTERNAL "" FORCE)
|
||||
else()
|
||||
target_compile_definitions(${target} ${ARGN})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
set(MODULE_NAME "python_bindings_generator")
|
||||
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
||||
ocv_add_module(${MODULE_NAME} INTERNAL)
|
||||
|
||||
set(OPENCV_PYTHON_SIGNATURES_FILE "${CMAKE_CURRENT_BINARY_DIR}/pyopencv_signatures.json" CACHE INTERNAL "")
|
||||
|
Loading…
Reference in New Issue
Block a user