plyght's own C++ browser for macOS
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

up

plyght 15858711 b983c123

+28 -18
+28 -18
CMakeLists.txt
··· 10 10 11 11 find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Network) 12 12 13 - if(APPLE AND TARGET WrapOpenGL::WrapOpenGL) 14 - get_target_property(_wrap_opengl_links WrapOpenGL::WrapOpenGL INTERFACE_LINK_LIBRARIES) 15 - if(_wrap_opengl_links) 16 - set(_wrap_opengl_clean_links) 17 - list(LENGTH _wrap_opengl_links _wrap_opengl_link_count) 18 - set(_wrap_opengl_link_index 0) 19 - while(_wrap_opengl_link_index LESS _wrap_opengl_link_count) 20 - list(GET _wrap_opengl_links ${_wrap_opengl_link_index} _wrap_opengl_link) 21 - math(EXPR _wrap_opengl_next_index "${_wrap_opengl_link_index} + 1") 22 - if(_wrap_opengl_link STREQUAL "-framework" AND _wrap_opengl_next_index LESS _wrap_opengl_link_count) 23 - list(GET _wrap_opengl_links ${_wrap_opengl_next_index} _wrap_opengl_next_link) 24 - if(_wrap_opengl_next_link STREQUAL "AGL") 25 - math(EXPR _wrap_opengl_link_index "${_wrap_opengl_link_index} + 2") 13 + if(APPLE) 14 + function(remove_agl_framework_from_target target) 15 + if(NOT TARGET ${target}) 16 + return() 17 + endif() 18 + get_target_property(_links ${target} INTERFACE_LINK_LIBRARIES) 19 + if(NOT _links) 20 + return() 21 + endif() 22 + set(_clean_links) 23 + list(LENGTH _links _link_count) 24 + set(_link_index 0) 25 + while(_link_index LESS _link_count) 26 + list(GET _links ${_link_index} _link) 27 + math(EXPR _next_index "${_link_index} + 1") 28 + if(_link STREQUAL "-framework" AND _next_index LESS _link_count) 29 + list(GET _links ${_next_index} _next_link) 30 + if(_next_link STREQUAL "AGL") 31 + math(EXPR _link_index "${_link_index} + 2") 26 32 continue() 27 33 endif() 28 34 endif() 29 - if(NOT _wrap_opengl_link STREQUAL "AGL" AND NOT _wrap_opengl_link STREQUAL "-framework AGL" AND NOT _wrap_opengl_link MATCHES "/AGL\\.framework/?$") 30 - list(APPEND _wrap_opengl_clean_links "${_wrap_opengl_link}") 35 + if(NOT _link STREQUAL "AGL" AND NOT _link STREQUAL "-framework AGL" AND NOT _link MATCHES "/AGL\\.framework/?$") 36 + list(APPEND _clean_links "${_link}") 31 37 endif() 32 - math(EXPR _wrap_opengl_link_index "${_wrap_opengl_link_index} + 1") 38 + math(EXPR _link_index "${_link_index} + 1") 33 39 endwhile() 34 - set_target_properties(WrapOpenGL::WrapOpenGL PROPERTIES INTERFACE_LINK_LIBRARIES "${_wrap_opengl_clean_links}") 35 - endif() 40 + set_target_properties(${target} PROPERTIES INTERFACE_LINK_LIBRARIES "${_clean_links}") 41 + endfunction() 42 + 43 + remove_agl_framework_from_target(WrapOpenGL::WrapOpenGL) 44 + remove_agl_framework_from_target(Qt6::Gui) 45 + remove_agl_framework_from_target(Qt6::Widgets) 36 46 endif() 37 47 38 48 qt_add_executable(pocb MACOSX_BUNDLE