Sha256: 9132bb80cb6d9f7925be275c4a267f91fef82b383e9f0f1214b5e4726c76567b

Contents?: true

Size: 1.03 KB

Versions: 25

Compression:

Stored size: 1.03 KB

Contents

INCLUDE(FindPkgConfig)

# This function will find and set up a pkg-config based module.
# If a pc-file was found, it will resolve library paths to
# absolute paths. Furthermore, the function will automatically
# fall back to use static libraries in case no dynamic libraries
# were found.
FUNCTION(FIND_PKGLIBRARIES prefix package)
	PKG_CHECK_MODULES(${prefix} ${package})
	IF(NOT ${prefix}_FOUND)
		RETURN()
	ENDIF()

	FOREACH(LIBRARY ${${prefix}_LIBRARIES})
		FIND_LIBRARY(${LIBRARY}_RESOLVED ${LIBRARY} PATHS ${${prefix}_LIBRARY_DIRS})
		IF(${${LIBRARY}_RESOLVED} STREQUAL "${LIBRARY}_RESOLVED-NOTFOUND")
			MESSAGE(FATAL_ERROR "could not resolve ${LIBRARY}")
		ENDIF()
		LIST(APPEND RESOLVED_LIBRARIES ${${LIBRARY}_RESOLVED})
	ENDFOREACH(LIBRARY)

	SET(${prefix}_FOUND 1 PARENT_SCOPE)
	SET(${prefix}_LIBRARIES ${RESOLVED_LIBRARIES} PARENT_SCOPE)
	SET(${prefix}_INCLUDE_DIRS ${${prefix}_INCLUDE_DIRS} PARENT_SCOPE)
	SET(${prefix}_LDFLAGS ${${prefix}_LDFLAGS} PARENT_SCOPE)

	MESSAGE(STATUS "  Resolved libraries: ${RESOLVED_LIBRARIES}")
ENDFUNCTION()

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rugged-1.3.2.3 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.3.2.1 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.3.2 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.3.1 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.3.0 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.2.0 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.1.1 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.1.0 vendor/libgit2/cmake/FindPkgLibraries.cmake
rugged-1.0.1 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.5 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-1.0.0 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.99.0 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.27.10.1 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.4.1 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.4 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.27.10 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.3.1 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.27.9 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.2 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake
rugged-0.28.1 vendor/libgit2/cmake/Modules/FindPkgLibraries.cmake