Browse Source

CMake: use if(var MATCHES ...) instead of if(${var} MATCHES ...).

pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
338b953ca3
  1. 2
      modules/FindEGL.cmake
  2. 2
      modules/FindOpenAL.cmake
  3. 2
      modules/FindOpenGLES2.cmake
  4. 2
      modules/FindOpenGLES3.cmake

2
modules/FindEGL.cmake

@ -69,7 +69,7 @@ if(NOT TARGET EGL::EGL)
# Work around BUGGY framework support on macOS. Do this also in case of # Work around BUGGY framework support on macOS. Do this also in case of
# Emscripten, since there we don't have a location either. # Emscripten, since there we don't have a location either.
# http://public.kitware.com/pipermail/cmake/2016-April/063179.html # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
if((APPLE AND ${EGL_LIBRARY} MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN) if((APPLE AND EGL_LIBRARY MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN)
add_library(EGL::EGL INTERFACE IMPORTED) add_library(EGL::EGL INTERFACE IMPORTED)
set_property(TARGET EGL::EGL APPEND PROPERTY set_property(TARGET EGL::EGL APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${EGL_LIBRARY}) INTERFACE_LINK_LIBRARIES ${EGL_LIBRARY})

2
modules/FindOpenAL.cmake

@ -166,7 +166,7 @@ if(NOT TARGET OpenAL::OpenAL)
# Work around BUGGY framework support on macOS. Do this also in case of # Work around BUGGY framework support on macOS. Do this also in case of
# Emscripten, since there we don't have a location either. # Emscripten, since there we don't have a location either.
# http://public.kitware.com/pipermail/cmake/2016-April/063179.html # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
if((APPLE AND ${OPENAL_LIBRARY} MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN) if((APPLE AND OPENAL_LIBRARY MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN)
add_library(OpenAL::OpenAL INTERFACE IMPORTED) add_library(OpenAL::OpenAL INTERFACE IMPORTED)
set_property(TARGET OpenAL::OpenAL APPEND PROPERTY set_property(TARGET OpenAL::OpenAL APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY}) INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY})

2
modules/FindOpenGLES2.cmake

@ -64,7 +64,7 @@ if(NOT TARGET OpenGLES2::OpenGLES2)
# Work around BUGGY framework support on macOS. Do this also in case of # Work around BUGGY framework support on macOS. Do this also in case of
# Emscripten, since there we don't have a location either. # Emscripten, since there we don't have a location either.
# http://public.kitware.com/pipermail/cmake/2016-April/063179.html # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
if((CORRADE_TARGET_APPLE AND ${OPENGLES2_LIBRARY} MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN) if((CORRADE_TARGET_APPLE AND OPENGLES2_LIBRARY MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN)
add_library(OpenGLES2::OpenGLES2 INTERFACE IMPORTED) add_library(OpenGLES2::OpenGLES2 INTERFACE IMPORTED)
set_property(TARGET OpenGLES2::OpenGLES2 APPEND PROPERTY set_property(TARGET OpenGLES2::OpenGLES2 APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${OPENGLES2_LIBRARY}) INTERFACE_LINK_LIBRARIES ${OPENGLES2_LIBRARY})

2
modules/FindOpenGLES3.cmake

@ -69,7 +69,7 @@ if(NOT TARGET OpenGLES3::OpenGLES3)
# Work around BUGGY framework support on macOS. Do this also in case of # Work around BUGGY framework support on macOS. Do this also in case of
# Emscripten, since there we don't have a location either. # Emscripten, since there we don't have a location either.
# http://public.kitware.com/pipermail/cmake/2016-April/063179.html # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
if((CORRADE_TARGET_APPLE AND ${OPENGLES3_LIBRARY} MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN) if((CORRADE_TARGET_APPLE AND OPENGLES3_LIBRARY MATCHES "\\.framework$") OR CORRADE_TARGET_EMSCRIPTEN)
add_library(OpenGLES3::OpenGLES3 INTERFACE IMPORTED) add_library(OpenGLES3::OpenGLES3 INTERFACE IMPORTED)
set_property(TARGET OpenGLES3::OpenGLES3 APPEND PROPERTY set_property(TARGET OpenGLES3::OpenGLES3 APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${OPENGLES3_LIBRARY}) INTERFACE_LINK_LIBRARIES ${OPENGLES3_LIBRARY})

Loading…
Cancel
Save