mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: Using foreach to iterate through CFLAGS_OTHER
PkgConfig use 'separate_arguments' for pkgconfig result, so output converted to the list (in cmake it's semicolumnt separated values). If we try to append CFLAGS_OTHER as is, it will provide error for more then one cflag in '.pc' file Fix #4175, fix #4457.
This commit is contained in:
parent
d90a60bdf7
commit
9a0632b0cf
@ -74,7 +74,9 @@ function(search_dependency pkg)
|
|||||||
else()
|
else()
|
||||||
link_directories(${${pkg}_LIBRARY_DIRS})
|
link_directories(${${pkg}_LIBRARY_DIRS})
|
||||||
include_directories(${${pkg}_INCLUDE_DIRS})
|
include_directories(${${pkg}_INCLUDE_DIRS})
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${pkg}_CFLAGS_OTHER}" PARENT_SCOPE)
|
foreach(flag ${${pkg}_CFLAGS_OTHER})
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE)
|
||||||
|
endforeach()
|
||||||
set(ALL_LIBRARIES ${ALL_LIBRARIES} ${${pkg}_LIBRARIES} PARENT_SCOPE)
|
set(ALL_LIBRARIES ${ALL_LIBRARIES} ${${pkg}_LIBRARIES} PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user