Replaced our usage of LINK_PRIVATE with that of LINK_INTERFACE_LIBRARIES.
The reasons for that are twofold: 1) LINK_PRIVATE is only available since CMake 2.8.7. 2) The way it was used generated a warning because of CMake policy CMP0023: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0023 Using LINK_INTERFACE_LIBRARIES actually causes another warning - this time because of CMake policy CMP0022: http://www.cmake.org/cmake/help/v2.8.12/cmake.html#policy:CMP0022 I set the policy to OLD, because NEW means subtle changes when compiling with CMake 2.8.12, and I don't want to research that this close to release. :-) I also removed the setting of CMP0003, because it's set by cmake_minimal_version anyway.
This commit is contained in:
@@ -535,9 +535,10 @@ macro(ocv_create_module)
|
||||
|
||||
if(NOT "${ARGN}" STREQUAL "SKIP_LINK")
|
||||
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS})
|
||||
target_link_libraries(${the_module} LINK_PRIVATE ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
|
||||
target_link_libraries(${the_module} LINK_INTERFACE_LIBRARIES ${OPENCV_MODULE_${the_module}_DEPS})
|
||||
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
|
||||
if (HAVE_CUDA)
|
||||
target_link_libraries(${the_module} LINK_PRIVATE ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||
target_link_libraries(${the_module} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user