@@ -13,30 +13,7 @@ find_package(ZLIB REQUIRED)
1313
1414# Essos/Westeros are typically discovered via pkg-config in RDK/RDKE SDKs.
1515pkg_check_modules (ESSOS REQUIRED IMPORTED_TARGET essos )
16-
17- # Different platforms/layers use different module names for the same library.
18- # Allow override and try common defaults.
19- set (WESTEROS_GL_PKGCONFIG_NAME "" CACHE STRING "pkg-config module name for Westeros GL (e.g. westeros-gl or westeros_gl)" )
20-
21- if (WESTEROS_GL_PKGCONFIG_NAME)
22- pkg_check_modules (WESTEROS_GL QUIET IMPORTED_TARGET ${WESTEROS_GL_PKGCONFIG_NAME} )
23- else ()
24- pkg_check_modules (WESTEROS_GL QUIET IMPORTED_TARGET westeros_gl )
25- if (NOT WESTEROS_GL_FOUND)
26- pkg_check_modules (WESTEROS_GL QUIET IMPORTED_TARGET westeros-gl )
27- endif ()
28- if (NOT WESTEROS_GL_FOUND)
29- pkg_check_modules (WESTEROS_GL QUIET IMPORTED_TARGET westerosgl )
30- endif ()
31- endif ()
32-
33- if (NOT WESTEROS_GL_FOUND)
34- # Some SDKs ship the library without a pkg-config file.
35- find_library (WESTEROS_GL_LIBRARY NAMES westeros_gl )
36- if (NOT WESTEROS_GL_LIBRARY)
37- message (FATAL_ERROR "Westeros GL not found. Tried pkg-config modules: westeros_gl, westeros-gl, westerosgl (or WESTEROS_GL_PKGCONFIG_NAME override) and library libwesteros_gl" )
38- endif ()
39- endif ()
16+ pkg_check_modules (WESTEROS_GL REQUIRED IMPORTED_TARGET westeros_gl )
4017
4118# EGL/GLESv2: locate both headers and libraries (important for sysroot builds).
4219find_path (EGL_INCLUDE_DIR NAMES EGL/egl.h )
@@ -66,6 +43,7 @@ target_include_directories(rdke_splash PRIVATE
6643)
6744
6845target_link_libraries (rdke_splash PRIVATE
46+ PkgConfig::WESTEROS_GL
6947 PkgConfig::ESSOS
7048 ${EGL_LIBRARY}
7149 ${GLESv2_LIBRARY}
@@ -74,12 +52,6 @@ target_link_libraries(rdke_splash PRIVATE
7452 ZLIB::ZLIB
7553)
7654
77- if (WESTEROS_GL_FOUND)
78- target_link_libraries (rdke_splash PRIVATE PkgConfig::WESTEROS_GL )
79- else ()
80- target_link_libraries (rdke_splash PRIVATE ${WESTEROS_GL_LIBRARY} )
81- endif ()
82-
8355install (TARGETS rdke_splash
8456 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
8557)
0 commit comments