project (libvdpau-va-gl)
cmake_minimum_required (VERSION 2.6)
add_definitions(-std=gnu99 -Wall -fvisibility=hidden -ggdb)

find_package(PkgConfig REQUIRED)
pkg_check_modules(SOMELIBS vdpau glib-2.0 libswscale libva-glx gl glu REQUIRED)

add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
enable_testing()
add_subdirectory(tests)

link_directories (
	${SOMELIBS_LIBRARY_DIRS}
)

include_directories (
	${SOMELIBS_INCLUDE_DIRS}
)

add_library (vdpau_va_gl SHARED
	vdpau-soft.c
	vdpau-entry.c
	vdpau-trace.c
	vdpau-locking.c
	reverse-constant.c
	handle-storage.c
	bitstream.c
	h264-parse.c
	globals.c
	watermark.c
	ctx-stack.c
)

add_library (xinitthreads SHARED xinitthreads.c)

target_link_libraries (vdpau_va_gl
	${SOMELIBS_LIBRARIES}
)

target_link_libraries (xinitthreads -lpthread -lX11)

set_target_properties (vdpau_va_gl
	PROPERTIES
	VERSION 1
)

install (TARGETS vdpau_va_gl DESTINATION lib)

project (libvdpau-va-gl)
cmake_minimum_required (VERSION 2.6)
add_definitions(-std=gnu99 -Wall -fvisibility=hidden -ggdb)

find_package(PkgConfig REQUIRED)
pkg_check_modules(SOMELIBS vdpau glib-2.0 libswscale libva-glx gl glu REQUIRED)

add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
enable_testing()
add_subdirectory(tests)

link_directories (
	${SOMELIBS_LIBRARY_DIRS}
)

include_directories (
	${SOMELIBS_INCLUDE_DIRS}
)

add_library (vdpau_va_gl SHARED
	vdpau-soft.c
	vdpau-entry.c
	vdpau-trace.c
	vdpau-locking.c
	reverse-constant.c
	handle-storage.c
	bitstream.c
	h264-parse.c
	globals.c
	watermark.c
	ctx-stack.c
)

add_library (xinitthreads SHARED xinitthreads.c)

target_link_libraries (vdpau_va_gl
	${SOMELIBS_LIBRARIES}
)

target_link_libraries (xinitthreads -lpthread -lX11)

set_target_properties (vdpau_va_gl
	PROPERTIES
	VERSION 1
)

install (TARGETS vdpau_va_gl DESTINATION lib/vdpau)

Change the DESTINATION to lib/vdpau .
Change the DESTINATION to lib/vdpau .

# pkgfile -rv lib/vdpau
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r600.so.1.0.0
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r300.so
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r300.so.1.0.0
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_radeonsi.so.1.0.0
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r600.so.1
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_radeonsi.so.1
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r300.so.1
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_radeonsi.so
extra/ati-dri 9.1.2-1            	/usr/lib/vdpau/libvdpau_r600.so
extra/libvdpau 0.6-1             	/usr/lib/vdpau/libvdpau_trace.so.1.0.0
extra/libvdpau 0.6-1             	/usr/lib/vdpau/libvdpau_trace.so.1
extra/libvdpau 0.6-1             	/usr/lib/vdpau/libvdpau_trace.so
extra/mesa 9.1.2-1               	/usr/lib/vdpau/libvdpau_softpipe.so.1
extra/mesa 9.1.2-1               	/usr/lib/vdpau/libvdpau_softpipe.so.1.0.0
extra/mesa 9.1.2-1               	/usr/lib/vdpau/libvdpau_softpipe.so
extra/nouveau-dri 9.1.2-1        	/usr/lib/vdpau/libvdpau_nouveau.so
extra/nouveau-dri 9.1.2-1        	/usr/lib/vdpau/libvdpau_nouveau.so.1
extra/nouveau-dri 9.1.2-1        	/usr/lib/vdpau/libvdpau_nouveau.so.1.0.0
extra/nvidia-304xx-utils 304.88-1	/usr/lib/vdpau/libvdpau_nvidia.so.1
extra/nvidia-304xx-utils 304.88-1	/usr/lib/vdpau/libvdpau_nvidia.so.304.88
extra/nvidia-304xx-utils 304.88-1	/usr/lib/vdpau/libvdpau_nvidia.so
extra/nvidia-utils 319.17-1      	/usr/lib/vdpau/libvdpau_nvidia.so
extra/nvidia-utils 319.17-1      	/usr/lib/vdpau/libvdpau_nvidia.so.319.17
extra/nvidia-utils 319.17-1      	/usr/lib/vdpau/libvdpau_nvidia.so.1