mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
@@ -265,9 +265,7 @@ endfunction()
|
|||||||
|
|
||||||
# create an imported target from all the information returned by pkg-config
|
# create an imported target from all the information returned by pkg-config
|
||||||
function(_pkg_create_imp_target _prefix _imp_target_global)
|
function(_pkg_create_imp_target _prefix _imp_target_global)
|
||||||
# only create the target if it is linkable, i.e. no executables
|
if (NOT TARGET PkgConfig::${_prefix})
|
||||||
if (NOT TARGET PkgConfig::${_prefix}
|
|
||||||
AND ( ${_prefix}_INCLUDE_DIRS OR ${_prefix}_LINK_LIBRARIES OR ${_prefix}_LDFLAGS_OTHER OR ${_prefix}_CFLAGS_OTHER ))
|
|
||||||
if(${_imp_target_global})
|
if(${_imp_target_global})
|
||||||
set(_global_opt "GLOBAL")
|
set(_global_opt "GLOBAL")
|
||||||
else()
|
else()
|
||||||
|
@@ -11,3 +11,7 @@ pkg_search_module(Empty REQUIRED empty IMPORTED_TARGET)
|
|||||||
if(NOT Empty_MODULE_NAME STREQUAL "empty")
|
if(NOT Empty_MODULE_NAME STREQUAL "empty")
|
||||||
message(FATAL_ERROR "Wrong value for Empty_MODULE_NAME. Expected: empty, got: ${Empty_MODULE_NAME}")
|
message(FATAL_ERROR "Wrong value for Empty_MODULE_NAME. Expected: empty, got: ${Empty_MODULE_NAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT TARGET PkgConfig::Empty)
|
||||||
|
message(FATAL_ERROR "PkgConfig::Empty target not created")
|
||||||
|
endif()
|
||||||
|
Reference in New Issue
Block a user