diff options
author | Peter <peter.vicman@gmail.com> | 2024-06-13 11:00:13 +0200 |
---|---|---|
committer | Peter <peter.vicman@gmail.com> | 2024-06-13 11:00:13 +0200 |
commit | 627e8b3da4838feadf3b2f6be26e82639a817c06 (patch) | |
tree | f9c4bf7144304dc0210d40ada44f8f24bc4d10da /cmake | |
parent | 0f7f6ac821a31b0360e8563b98b2d435a8c98d80 (diff) |
[cmake] FindEGL add IMPORTED_NO_SONAME property
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindEGL.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cmake/modules/FindEGL.cmake b/cmake/modules/FindEGL.cmake index 05d74c27e1..e0bad2feac 100644 --- a/cmake/modules/FindEGL.cmake +++ b/cmake/modules/FindEGL.cmake @@ -35,11 +35,17 @@ if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME}) check_include_files("EGL/egl.h;EGL/eglext.h;EGL/eglext_angle.h" HAVE_EGLEXTANGLE) unset(CMAKE_REQUIRED_INCLUDES) - add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED) + if(${EGL_LIBRARY} MATCHES ".+\.so$") + add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} SHARED IMPORTED) + else() + add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED) + endif() + set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES IMPORTED_LOCATION "${EGL_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}" - INTERFACE_COMPILE_DEFINITIONS HAS_EGL) + INTERFACE_COMPILE_DEFINITIONS HAS_EGL + IMPORTED_NO_SONAME TRUE) if(HAVE_EGLEXTANGLE) set_property(TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} APPEND PROPERTY |