[all] use cmake FindPkgConfig IMPORTED_TARGETs

This commit is contained in:
arcnmx
2021-07-23 18:47:54 -07:00
committed by Geoffrey McRae
parent aa2ea05af9
commit 3b37898eb2
6 changed files with 19 additions and 26 deletions

View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(renderer_Opengl LANGUAGES C CXX)
find_package(PkgConfig)
pkg_check_modules(RENDERER_OPENGL_PKGCONFIG REQUIRED
pkg_check_modules(RENDERER_OPENGL REQUIRED IMPORTED_TARGET
gl
)
@@ -14,7 +14,7 @@ add_library(renderer_OpenGL STATIC
target_compile_definitions(renderer_OpenGL PRIVATE CIMGUI_DEFINE_ENUMS_AND_STRUCTS=1)
target_link_libraries(renderer_OpenGL
${RENDERER_OPENGL_PKGCONFIG_LIBRARIES}
PkgConfig::RENDERER_OPENGL
lg_common
cimgui
@@ -23,5 +23,4 @@ target_link_libraries(renderer_OpenGL
target_include_directories(renderer_OpenGL
PRIVATE
src
${RENDERER_OPENGL_PKGCONFIG_INCLUDE_DIRS}
)