Distinguish exporting/enabling resources of static libs

Required because we now allow to provide dynamic libs as
dependencies of static libs
experiment/srcref_basic_cfg
Martchus 6 years ago
parent 17a08baeb5
commit 032111eef0

@ -66,6 +66,12 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
endif()
endif()
# add Qt resources of static library to be enabled
if(${NAME}_QT_RESOURCES)
message(STATUS "Adding ${${NAME}_QT_RESOURCES} to LIBRARIES_QT_RESOURCES for ${META_PROJECT_NAME}.")
list(APPEND LIBRARIES_QT_RESOURCES ${${NAME}_QT_RESOURCES})
endif()
elseif((${NAME}_DYNAMIC_LIB OR ${NAME}_SHARED_LIB) AND (("${LINKAGE}" STREQUAL "AUTO_LINKAGE") OR ("${LINKAGE}" STREQUAL "SHARED")))
set(USE_${NAME} ON)
set(USE_SHARED_${NAME} ON)
@ -122,6 +128,12 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
endif()
endif()
# add Qt resources of static library for exporting it
if(${NAME}_QT_RESOURCES)
message(STATUS "Adding ${${NAME}_QT_RESOURCES} to STATIC_LIBRARIES_QT_RESOURCES for ${META_PROJECT_NAME}.")
list(APPEND STATIC_LIBRARIES_QT_RESOURCES ${${NAME}_QT_RESOURCES})
endif()
elseif((${NAME}_DYNAMIC_LIB OR ${NAME}_SHARED_LIB) AND (("${LINKAGE}" STREQUAL "AUTO_LINKAGE" AND (NOT ${NAME}_STATIC_LIB OR (NOT STATIC_LINKAGE AND "${META_PROJECT_TYPE}" STREQUAL "application") OR (NOT STATIC_LIBRARY_LINKAGE AND ("${META_PROJECT_TYPE}" STREQUAL "" OR "${META_PROJECT_TYPE}" STREQUAL "library")))) OR ("${LINKAGE}" STREQUAL "SHARED")))
set(USE_${NAME} ON)
set(USE_SHARED_${NAME} ON)

@ -85,9 +85,4 @@ macro(use_@META_PROJECT_VARNAME@)
if(@META_PROJECT_VARNAME_UPPER@_HAS_QT_TRANSLATION_FILES)
list(APPEND APP_SPECIFIC_QT_TRANSLATION_FILES @META_PROJECT_NAME@)
endif()
# ensure Qt resources of static libs are loaded
if(USE_STATIC_@META_PROJECT_VARNAME_UPPER@ AND @META_PROJECT_VARNAME_UPPER@_QT_RESOURCES)
message(STATUS "Adding ${@META_PROJECT_VARNAME_UPPER@_QT_RESOURCES} to LIBRARIES_QT_RESOURCES for ${META_PROJECT_NAME}.")
list(APPEND LIBRARIES_QT_RESOURCES ${@META_PROJECT_VARNAME_UPPER@_QT_RESOURCES})
endif()
endmacro()

Loading…
Cancel
Save