|
|
|
@ -46,16 +46,16 @@ endif() |
|
|
|
|
set(OpenCV_LIB_COMPONENTS_) |
|
|
|
|
foreach(CVLib ${OpenCV_LIB_COMPONENTS}) |
|
|
|
|
|
|
|
|
|
get_target_property(libloc ${CVLib} LOCATION_${CMAKE_BUILD_TYPE}) |
|
|
|
|
if(libloc MATCHES "3rdparty") |
|
|
|
|
set(libpath "\${exec_prefix}/share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}") |
|
|
|
|
else() |
|
|
|
|
set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}") |
|
|
|
|
get_target_property(libname ${CVLib} OUTPUT_NAME_${CMAKE_BUILD_TYPE}) |
|
|
|
|
if(NOT libname) |
|
|
|
|
get_target_property(libname ${CVLib} OUTPUT_NAME) |
|
|
|
|
endif() |
|
|
|
|
if(NOT libname) |
|
|
|
|
set(libname "${CVLib}") |
|
|
|
|
endif() |
|
|
|
|
list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}") |
|
|
|
|
|
|
|
|
|
get_filename_component(libname ${CVLib} NAME_WE) |
|
|
|
|
string(REGEX REPLACE "^lib" "" libname "${libname}") |
|
|
|
|
set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}") |
|
|
|
|
list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}") |
|
|
|
|
list(APPEND OpenCV_LIB_COMPONENTS_ "-l${libname}") |
|
|
|
|
|
|
|
|
|
endforeach() |
|
|
|
@ -66,7 +66,7 @@ if(OpenCV_EXTRA_COMPONENTS) |
|
|
|
|
if(TARGET "${extra_component}") |
|
|
|
|
get_target_property(extra_component_is_imported "${extra_component}" IMPORTED) |
|
|
|
|
if(extra_component_is_imported) |
|
|
|
|
get_target_property(extra_component "${extra_component}" LOCATION) |
|
|
|
|
get_target_property(extra_component "${extra_component}" IMPORTED_LOCATION) |
|
|
|
|
endif() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|