mirror of https://github.com/mgba-emu/mgba.git
All: Fix frameworks on newer CMakes
This commit is contained in:
parent
a4326242c7
commit
67a09eaa1d
|
@ -99,7 +99,23 @@ function(find_feature FEATURE_NAME FEATURE_REQUIRES)
|
|||
set(${UREQUIRE}_CFLAGS_OTHER ${${REQUIRE}_CFLAGS_OTHER} PARENT_SCOPE)
|
||||
set(${UREQUIRE}_FOUND ${${REQUIRE}_FOUND} PARENT_SCOPE)
|
||||
set(${UREQUIRE}_INCLUDE_DIRS ${${REQUIRE}_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(${UREQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE)
|
||||
if (APPLE)
|
||||
set(IS_FRAMEWORK OFF)
|
||||
set(LIBS)
|
||||
foreach(LIB IN LISTS ${REQUIRE}_LIBRARIES)
|
||||
if(LIB STREQUAL "-framework")
|
||||
set(IS_FRAMEWORK ON)
|
||||
elseif(IS_FRAMEWORK)
|
||||
list(APPEND LIBS "-framework ${LIB}")
|
||||
set(IS_FRAMEWORK OFF)
|
||||
else()
|
||||
list(APPEND LIBS ${LIB})
|
||||
endif()
|
||||
endforeach()
|
||||
set(${UREQUIRE}_LIBRARIES ${LIBS} PARENT_SCOPE)
|
||||
else()
|
||||
set(${UREQUIRE}_LIBRARIES ${${REQUIRE}_LIBRARIES} PARENT_SCOPE)
|
||||
endif()
|
||||
set(${UREQUIRE}_LIBRARY_DIRS ${${REQUIRE}_LIBRARY_DIRS} PARENT_SCOPE)
|
||||
set(${UREQUIRE}_LDFLAGS_OTHER ${${REQUIRE}_LDFLAGS_OTHER} PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
|
Loading…
Reference in New Issue