mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
/test/*.sh enabled for CTest in UNIX
This commit is contained in:
committed by
Erik de Castro Lopo
parent
6cd2b6cded
commit
5435f15be4
@@ -1,34 +1,39 @@
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(_OGG QUIET ogg)
|
||||
|
||||
find_path(_OGG_INCLUDE_DIR
|
||||
find_path(OGG_INCLUDE_DIR
|
||||
NAMES "ogg/ogg.h"
|
||||
PATHS ${_OGG_INCLUDE_DIRS})
|
||||
|
||||
find_library(_OGG_LIBRARY
|
||||
find_library(OGG_LIBRARY
|
||||
NAMES ogg libogg
|
||||
HINTS ${_OGG_LIBRARY_DIRS})
|
||||
|
||||
find_library(_OGG_LIBRARY_STATIC
|
||||
find_library(OGG_LIBRARY_STATIC
|
||||
NAMES libogg.a libogg_static
|
||||
HINTS ${_OGG_LIBRARY_DIRS})
|
||||
|
||||
mark_as_advanced(
|
||||
OGG_INCLUDE_DIR
|
||||
OGG_LIBRARY
|
||||
OGG_LIBRARY_DIRS)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OGG
|
||||
REQUIRED_VARS _OGG_INCLUDE_DIR _OGG_LIBRARY
|
||||
REQUIRED_VARS OGG_INCLUDE_DIR OGG_LIBRARY
|
||||
VERSION_VAR _OGG_VERSION)
|
||||
|
||||
if(OGG_FOUND)
|
||||
if(NOT Ogg::Ogg)
|
||||
add_library(Ogg::Ogg UNKNOWN IMPORTED)
|
||||
set_target_properties(Ogg::Ogg PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OGG_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${_OGG_LIBRARY}")
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${OGG_LIBRARY}")
|
||||
endif()
|
||||
if(NOT Ogg::Ogg-static AND _OGG_LIBRARY_STATIC)
|
||||
add_library(Ogg::Ogg-static STATIC IMPORTED)
|
||||
set_target_properties(Ogg::Ogg-static PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OGG_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${_OGG_LIBRARY_STATIC}")
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${OGG_LIBRARY_STATIC}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user