Browse Source

Allow checking whether external lib is used

testing/bash_completion_debugging
Martchus 5 years ago
parent
commit
6042336038
  1. 2
      cmake/modules/3rdParty.cmake

2
cmake/modules/3rdParty.cmake

@ -44,6 +44,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
# add library to list of libraries to link against when building dynamic libraries or applications
if(${NAME}_STATIC_LIB AND (("${LINKAGE}" STREQUAL "AUTO_LINKAGE" AND ((NOT (${NAME}_DYNAMIC_LIB OR ${NAME}_SHARED_LIB)) OR (STATIC_LINKAGE AND "${META_PROJECT_TYPE}" STREQUAL "application") OR (STATIC_LIBRARY_LINKAGE AND ("${META_PROJECT_TYPE}" STREQUAL "" OR "${META_PROJECT_TYPE}" STREQUAL "library")))) OR ("${LINKAGE}" STREQUAL "STATIC")))
set(USE_${NAME} ON)
set(USE_STATIC_${NAME} ON)
list(APPEND LIBRARIES ${${NAME}_STATIC_LIB})
if(${${NAME}_STATIC_LIB} IN_LIST META_PUBLIC_STATIC_LIB_DEPENDS)
@ -53,6 +54,7 @@ if(NOT DEFINED THIRD_PARTY_MODULE_LOADED)
endif()
message(STATUS "Linking ${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX} statically against external library ${NAME} (${${NAME}_STATIC_LIB}).")
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)
if(NOT ${NAME}_DYNAMIC_LIB)
set(${NAME}_DYNAMIC_LIB ${${NAME}_SHARED_LIB})

Loading…
Cancel
Save