build: allow GSTREAMER_ROOT to be set manually

This commit is contained in:
Joshua M. Doe 2017-09-26 09:28:29 -04:00
parent 9ffda399d9
commit 4e24b69eaa
5 changed files with 30 additions and 20 deletions

View File

@ -21,11 +21,13 @@ if (NOT WIN32)
pkg_check_modules(PKG_GLIB REQUIRED glib-2.0)
endif(NOT WIN32)
if (NOT GSTREAMER_ROOT)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64})
else ()
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86})
endif ()
endif ()
find_path(GLIB2_MAIN_INCLUDE_DIR glib.h
PATH_SUFFIXES glib-2.0

View File

@ -28,11 +28,13 @@ IF (NOT WIN32)
SET(GOBJECT_DEFINITIONS ${PKG_GOBJECT2_CFLAGS})
ENDIF (NOT WIN32)
if (NOT GSTREAMER_ROOT)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64})
else ()
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86})
endif ()
endif ()
FIND_PATH(GOBJECT_INCLUDE_DIR gobject/gobject.h
HINTS ${PKG_GOBJECT2_INCLUDE_DIRS} ${PKG_GOBJECT2_INCLUDEDIR}

View File

@ -38,11 +38,13 @@ if (PKG_CONFIG_FOUND)
OUTPUT_VARIABLE PKG_GSTREAMER_PLUGIN_DIR)
endif()
if (NOT GSTREAMER_ROOT)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64})
else ()
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86})
endif ()
endif ()
find_library(GSTREAMER_LIBRARY
NAMES gstreamer-${GSTREAMER_ABI_VERSION}

View File

@ -16,11 +16,13 @@ if (NOT WIN32)
pkg_check_modules(PKG_ORC REQUIRED orc-0.4)
endif(NOT WIN32)
if (NOT GSTREAMER_ROOT)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64})
else ()
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86})
endif ()
endif ()
find_path(ORC_INCLUDE_DIR orc/orc.h
PATH_SUFFIXES orc-0.4

View File

@ -20,11 +20,13 @@ macro(find_gstreamer_library _name _header _abi_version)
pkg_check_modules(PKG_GSTREAMER_${_upper_name} gstreamer-${_lower_name}-${_abi_version})
endif()
if (NOT GSTREAMER_ROOT)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86_64})
else ()
set(GSTREAMER_ROOT $ENV{GSTREAMER_1_0_ROOT_X86})
endif ()
endif ()
find_library(GSTREAMER_${_upper_name}_LIBRARY
NAMES gst${_lower_name}-${_abi_version}