80 | | SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) |
| 80 | IF(Q_WS_MAC) |
| 81 | # On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL". |
| 82 | # The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the |
| 83 | # linker command. So we need to protect the "-framework foo" as non-separatable strings. |
| 84 | # We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(), |
| 85 | # and then we replace the underscores again with spaces. So we get proper linker commands. Alex |
| 86 | STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") |
| 87 | SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) |
| 88 | STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") |
| 89 | ELSE(Q_WS_MAC) |
| 90 | SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) |
| 91 | ENDIF(Q_WS_MAC) |