cmake: Add cdvdgigaherz and dependencies

Only new dependency is libudev.
This commit is contained in:
Jonathan Li 2016-10-26 18:18:42 +01:00
parent 16b6cc41a4
commit a283e95fed
4 changed files with 67 additions and 4 deletions

View File

@ -78,6 +78,15 @@ endif()
include(CheckLib)
if(Linux)
check_lib(AIO aio libaio.h)
# There are two udev pkg config files - udev.pc (wrong), libudev.pc (correct)
# When cross compiling, pkg-config will be skipped so we have to look for
# udev (it'll automatically be prefixed with lib). But when not cross
# compiling, we have to look for libudev.pc. Argh. Hence the silliness below.
if(CMAKE_CROSSCOMPILING)
check_lib(LIBUDEV udev libudev.h)
else()
check_lib(LIBUDEV libudev libudev.h)
endif()
endif()
if(EGL_API)
check_lib(EGL EGL EGL/egl.h)

View File

@ -3,6 +3,7 @@
#-------------------------------------------------------------------------------
set(msg_dep_common_libs "check these libraries -> wxWidgets (>=2.8.10), aio")
set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs")
set(msg_dep_cdvdgiga "check these libraries -> gtk2, libudev")
set(msg_dep_cdvdiso "check these libraries -> bzip2 (>=1.0.5), gtk2 (>=2.16)")
set(msg_dep_zerogs "check these libraries -> glew (>=1.6), opengl, X11, nvidia-cg-toolkit (>=2.1)")
set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11")
@ -96,6 +97,19 @@ if(GTKn_FOUND)
endif()
#---------------------------------------
#---------------------------------------
# cdvdGigaherz
#---------------------------------------
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/cdvdGigaherz" OR NOT Linux)
set(cdvdGigaherz FALSE)
elseif(Linux AND GTKn_FOUND AND LIBUDEV_FOUND)
set(cdvdGigaherz TRUE)
else()
set(cdvdGigaherz FALSE)
print_dep("Skip build of cdvdGigaherz: miss some dependencies" "${msg_dep_cdvdgiga}")
endif()
#---------------------------------------
#---------------------------------------
# CDVDiso
#---------------------------------------
@ -300,7 +314,6 @@ endif()
#-------------------------------------------------------------------------------
# [TODO] Write CMakeLists.txt for these plugins.
set(cdvdGigaherz FALSE)
set(CDVDisoEFP FALSE)
set(CDVDolio FALSE)
set(CDVDpeops FALSE)

View File

@ -6,9 +6,9 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
endif()
#if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/cdvdGigaherz" AND cdvdGigaherz)
# add_subdirectory(cdvdGigaherz)
#endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/cdvdGigaherz" AND cdvdGigaherz)
add_subdirectory(cdvdGigaherz/src)
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDiso" AND CDVDiso)
add_subdirectory(CDVDiso/src)

View File

@ -0,0 +1,41 @@
#Check that people use the good file
if (NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advised to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif()
#plugin name(no version number to ease future version bump and bisect)
set(Output cdvdGigaherz)
set(Sources
CDVD.cpp
ReadThread.cpp
Settings.cpp
TocStuff.cpp
)
set(Headers
CDVD.h
Settings.h
)
set(LinuxSources
Unix/GtkGui.cpp
Unix/LinuxConfig.cpp
Unix/LinuxIOCtlSrc.cpp
)
set(FinalSources
${Sources}
${Headers}
)
set(FinalSources ${FinalSources} ${LinuxSources})
set(FinalLibs
${GTK2_LIBRARIES}
${LIBC_LIBRARIES}
${LIBUDEV_LIBRARIES}
)
add_pcsx2_plugin(${Output} "${FinalSources}" "${FinalLibs}" "${FinalFlags}")