Use also actual lib name to check whether dependency is public

In accordance to 'Fix adding public Qt modules in pkg-config'
in qtutilities (b2e3506ff59ae4b610c91bd9ee96333871fa5864).
experiment/srcref_basic_cfg
Martchus 5 years ago
parent 472e0296d0
commit ae249140bc
  1. 8
      cmake/modules/3rdParty.cmake

@ -54,7 +54,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
message(STATUS "Adding include path for ${NAME} to ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}: ${${NAME}_STATIC_INCLUDE_DIR}")
endif()
if(${NAME} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS)
if(${${NAME}_STATIC_LIB} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS OR ${NAME} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS)
list(APPEND ${PUBLIC_LIBRARIES_VARNAME} ${${NAME}_STATIC_LIB})
if(${NAME}_STATIC_INCLUDE_DIR)
list(APPEND PUBLIC_SHARED_INCLUDE_DIRS ${${NAME}_STATIC_INCLUDE_DIR})
@ -85,7 +85,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
message(STATUS "Adding include path for ${NAME} to ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}: ${${NAME}_DYNAMIC_INCLUDE_DIR}")
endif()
if(${NAME} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS)
if(${${NAME}_DYNAMIC_LIB} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS OR ${NAME} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS)
list(APPEND ${PUBLIC_LIBRARIES_VARNAME} ${${NAME}_DYNAMIC_LIB})
if(${NAME}_DYNAMIC_INCLUDE_DIR)
list(APPEND PUBLIC_SHARED_INCLUDE_DIRS ${${NAME}_DYNAMIC_INCLUDE_DIR})
@ -116,7 +116,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
message(STATUS "Adding include path for ${NAME} to static ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}: ${${NAME}_STATIC_INCLUDE_DIR}")
endif()
if(${NAME} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS)
if(${${NAME}_STATIC_LIB} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS OR ${NAME} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS)
list(APPEND ${PUBLIC_STATIC_LIBRARIES_VARNAME} ${${NAME}_STATIC_LIB})
if(${NAME}_STATIC_INCLUDE_DIR)
list(APPEND PUBLIC_STATIC_INCLUDE_DIRS ${${NAME}_STATIC_INCLUDE_DIR})
@ -147,7 +147,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
message(STATUS "Adding include path for ${NAME} to static ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}: ${${NAME}_DYNAMIC_INCLUDE_DIR}")
endif()
if(${NAME} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS)
if(${${NAME}_DYNAMIC_LIB} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS OR ${NAME} IN_LIST META_PUBLIC_SHARED_LIB_DEPENDS)
list(APPEND ${PUBLIC_STATIC_LIBRARIES_VARNAME} ${${NAME}_DYNAMIC_LIB})
if(${NAME}_DYNAMIC_INCLUDE_DIR)
list(APPEND PUBLIC_STATIC_INCLUDE_DIRS ${${NAME}_DYNAMIC_INCLUDE_DIR})

Loading…
Cancel
Save