tde_import: Always do 'include' because macro can be called in a scope that is not global.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
master
Slávek Banko 2 months ago
parent 6ec646b006
commit fab0f33de4
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -880,14 +880,20 @@ macro( tde_import _library )
set( TDE_IMPORT_${_library} "build" CACHE INTERNAL "Library ${_library} activated for build" )
else()
if( EXISTS "${TDE_CMAKE_DIR}/${_library}.cmake" )
include( "${TDE_CMAKE_DIR}/${_library}.cmake" )
set( tde_import_include "${TDE_CMAKE_DIR}/${_library}.cmake" )
elseif( EXISTS "${TQT_CMAKE_DIR}/${_library}.cmake" )
include( "${TQT_CMAKE_DIR}/${_library}.cmake" )
set( tde_import_include "${TQT_CMAKE_DIR}/${_library}.cmake" )
else()
tde_message_fatal( "'${_library}' is required, but is not installed nor selected for build" )
endif()
include( "${tde_import_include}" )
message( STATUS "Checking for '${_library}' - ok, found import file" )
set( TDE_IMPORT_${_library} "import" CACHE INTERNAL "Library ${_library} imported" )
set( TDE_IMPORT_${_library} "import:${tde_import_include}" CACHE INTERNAL "Library ${_library} imported" )
endif()
else()
if( "${TDE_IMPORT_${_library}}" MATCHES "^import:" )
string( REGEX REPLACE "^import:" "" tde_import_include "${TDE_IMPORT_${_library}}" )
include( "${tde_import_include}" )
endif()
endif()
endmacro()

Loading…
Cancel
Save