Commit 92a6c7a0 authored by Steffen Ohrendorf's avatar Steffen Ohrendorf Committed by Ralph Giles

Fix install of pkgconfig files and allow use of OGG_ROOT variable

parent 445e63f2
...@@ -53,10 +53,15 @@ endfunction() ...@@ -53,10 +53,15 @@ endfunction()
message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
# Find ogg dependency # Find ogg dependency
find_package(PkgConfig QUIET) if(NOT OGG_ROOT)
pkg_check_modules(PC_OGG QUIET ogg) find_package(PkgConfig QUIET)
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg) pkg_check_modules(PC_OGG QUIET ogg)
find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS}) find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg)
find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS})
else()
find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${OGG_ROOT}/include PATH_SUFFIXES ogg)
find_library(OGG_LIBRARIES NAMES ogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64)
endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES) find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES)
...@@ -66,4 +71,11 @@ configure_pkg_config_file(vorbis.pc.in) ...@@ -66,4 +71,11 @@ configure_pkg_config_file(vorbis.pc.in)
configure_pkg_config_file(vorbisenc.pc.in) configure_pkg_config_file(vorbisenc.pc.in)
configure_pkg_config_file(vorbisfile.pc.in) configure_pkg_config_file(vorbisfile.pc.in)
install(FILES vorbis.pc vorbisenc.pc vorbisfile.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/vorbis.pc
${CMAKE_CURRENT_BINARY_DIR}/vorbisenc.pc
${CMAKE_CURRENT_BINARY_DIR}/vorbisfile.pc
DESTINATION
${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment