CMake: Fix framework handling for .pri files
Rather than embedding the full absolute path to the framework, we should instead write a -framework Foo flag. qmake seems to do this by specifying QMAKE_LIBS_FOO in the mkspec. We'll try to get away with just deriving the name of the framework from the path, to avoid having to introduce a mkspec equivalent mapping for CMake. This doesn't currently handle framework include paths, which qmake also handled by harcoding QMAKE_INCDIR_FOO in the mkspec, and then sysrootifying it via mkspecs/common/mac/sdk.prf. Hopefully that's not really needed, given that -framework flag should imply include paths as well. Somewhat partially amends c254254c55b24dd0653331e025cdfdbbdcca2a56 Task-number: QTBUG-85240 Task-number: QTBUG-84781 Change-Id: I70ea5021422d7b1f5afa9c4a595d1a9b8a8217d3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
167741717f
commit
3ef14c8943
@ -656,7 +656,11 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out
|
||||
list(APPEND lib_incdir "$<TARGET_PROPERTY:${lib_target},INTERFACE_INCLUDE_DIRECTORIES>")
|
||||
list(APPEND lib_defines "$<TARGET_PROPERTY:${lib_target},INTERFACE_COMPILE_DEFINITIONS>")
|
||||
else()
|
||||
list(APPEND lib_libs "${lib_target}")
|
||||
if(lib_target MATCHES "/([^/]+).framework$")
|
||||
list(APPEND lib_libs "-framework" "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
list(APPEND lib_libs "${lib_target}")
|
||||
endif()
|
||||
endif()
|
||||
endwhile()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user