Merge pull request #930 from scttgs0/topic-pkgconfig-findpackage

Improve PkgConfig usage
This commit is contained in:
OpenSceneGraph git repository 2020-03-23 17:28:55 +00:00 committed by GitHub
commit f2f22df811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 20 deletions

View File

@ -8,14 +8,10 @@
# correspond to the ./configure --prefix=$GTA_DIR
# used in building libgta.
INCLUDE(FindPkgConfig OPTIONAL)
find_package(PkgConfig QUIET)
IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(GTA gta)
ENDIF(PKG_CONFIG_FOUND)
IF(NOT GTA_FOUND)
@ -54,4 +50,4 @@ IF(NOT GTA_FOUND)
SET(GTA_FOUND "YES")
ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
ENDIF(NOT GTA_FOUND)
ENDIF(NOT GTA_FOUND)

View File

@ -1,10 +1,7 @@
#use pkg-config to find various modues
INCLUDE(FindPkgConfig OPTIONAL)
find_package(PkgConfig QUIET)
IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(GTK gtk+-2.0)
IF(WIN32)

View File

@ -1,10 +1,7 @@
#use pkg-config to find various modues
INCLUDE(FindPkgConfig OPTIONAL)
find_package(PkgConfig QUIET)
IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(CAIRO cairo)
PKG_CHECK_MODULES(POPPLER poppler-glib)

View File

@ -1,10 +1,7 @@
#use pkg-config to find various modues
INCLUDE(FindPkgConfig OPTIONAL)
find_package(PkgConfig QUIET)
IF(PKG_CONFIG_FOUND)
INCLUDE(FindPkgConfig)
#Version 2.35 introduces the rsvg_cleanup function which is used
PKG_CHECK_MODULES(RSVG librsvg-2.0>=2.35)
@ -14,5 +11,4 @@ IF(PKG_CONFIG_FOUND)
SET(RSVG_FOUND FALSE)
ENDIF()
ENDIF()

View File

@ -185,7 +185,7 @@ ELSE()
ELSEIF(${OSG_WINDOWING_SYSTEM} STREQUAL "X11")
# X11 for everybody else
INCLUDE(FindPkgConfig OPTIONAL)
find_package(PkgConfig QUIET)
IF(PKG_CONFIG_FOUND)
PKG_CHECK_MODULES(XRANDR xrandr)