cmake: fatal error if miss dependencies in package mode

+ don't install lilypad in package mode (not ready for distribution)
This commit is contained in:
Gregory Hainaut 2015-08-10 08:49:55 +02:00
parent 0663501d6f
commit 67c3587c0b
1 changed files with 23 additions and 22 deletions

View File

@ -15,6 +15,14 @@ else(GLSL_API)
set(msg_dep_zzogl "check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs") set(msg_dep_zzogl "check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs")
endif() endif()
macro(print_dep str dep)
if (PACKAGE_MODE)
message(FATAL_ERROR "${str}:${dep}")
else()
message(STATUS "${str}:${dep}")
endif()
endmacro(print_dep)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Pcsx2 core & common libs # Pcsx2 core & common libs
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -43,8 +51,7 @@ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/common/src")
set(common_libs FALSE) set(common_libs FALSE)
else() else()
set(common_libs FALSE) set(common_libs FALSE)
message(STATUS "Skip build of common libraries: miss some dependencies") print_dep("Skip build of common libraries: miss some dependencies" "${msg_dep_common_libs}")
message(STATUS "${msg_dep_common_libs}")
endif() endif()
#--------------------------------------- #---------------------------------------
@ -62,14 +69,12 @@ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/pcsx2")
set(pcsx2_core FALSE) set(pcsx2_core FALSE)
else() else()
set(pcsx2_core FALSE) set(pcsx2_core FALSE)
message(STATUS "Skip build of pcsx2 core: miss some dependencies") print_dep("Skip build of pcsx2 core: miss some dependencies" "${msg_dep_pcsx2}")
message(STATUS "${msg_dep_pcsx2}")
endif() endif()
# Linux need also gtk2 # Linux need also gtk2
if(UNIX AND pcsx2_core AND NOT GTKn_FOUND) if(UNIX AND pcsx2_core AND NOT GTKn_FOUND)
set(pcsx2_core FALSE) set(pcsx2_core FALSE)
message(STATUS "Skip build of pcsx2 core: miss some dependencies") print_dep("Skip build of pcsx2 core: miss some dependencies" "${msg_dep_pcsx2}")
message(STATUS "${msg_dep_pcsx2}")
endif() endif()
@ -102,8 +107,7 @@ if(EXTRA_PLUGINS)
set(CDVDiso FALSE) set(CDVDiso FALSE)
else() else()
set(CDVDiso FALSE) set(CDVDiso FALSE)
message(STATUS "Skip build of CDVDiso: miss some dependencies") print_dep("Skip build of CDVDiso: miss some dependencies" "${msg_dep_cdvdiso}")
message(STATUS "${msg_dep_cdvdiso}")
endif() endif()
endif() endif()
@ -150,8 +154,7 @@ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/GSdx")
set(GSdx FALSE) set(GSdx FALSE)
else() else()
set(GSdx FALSE) set(GSdx FALSE)
message(STATUS "Skip build of GSdx: miss some dependencies") print_dep("Skip build of GSdx: miss some dependencies" "${msg_dep_gsdx}")
message(STATUS "${msg_dep_gsdx}")
endif() endif()
#--------------------------------------- #---------------------------------------
@ -170,8 +173,7 @@ if(EXTRA_PLUGINS)
set(zerogs FALSE) set(zerogs FALSE)
else() else()
set(zerogs FALSE) set(zerogs FALSE)
message(STATUS "Skip build of zerogs: miss some dependencies") print_dep("Skip build of zerogs: miss some dependencies" "${msg_dep_zerogs}")
message(STATUS "${msg_dep_zerogs}")
endif() endif()
endif() endif()
#--------------------------------------- #---------------------------------------
@ -193,8 +195,7 @@ if(EXTRA_PLUGINS)
set(zzogl FALSE) set(zzogl FALSE)
else() else()
set(zzogl FALSE) set(zzogl FALSE)
message(STATUS "Skip build of zzogl: miss some dependencies") print_dep("Skip build of zzogl: miss some dependencies" "${msg_dep_zzogl}")
message(STATUS "${msg_dep_zzogl}")
endif() endif()
endif() endif()
#--------------------------------------- #---------------------------------------
@ -211,8 +212,11 @@ endif()
# LilyPad # LilyPad
# requires: -X11 # requires: -X11
#--------------------------------------- #---------------------------------------
if(GTKn_FOUND AND X11_FOUND) # Not ready to be packaged
set(LilyPad TRUE) if(EXTRA_PLUGINS OR NOT PACKAGE_MODE)
if(GTKn_FOUND AND X11_FOUND)
set(LilyPad TRUE)
endif()
endif() endif()
#--------------------------------------- #---------------------------------------
@ -228,8 +232,7 @@ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/onepad")
set(onepad FALSE) set(onepad FALSE)
else() else()
set(onepad FALSE) set(onepad FALSE)
message(STATUS "Skip build of onepad: miss some dependencies") print_dep("Skip build of onepad: miss some dependencies" "${msg_dep_onepad}")
message(STATUS "${msg_dep_onepad}")
endif() endif()
#--------------------------------------- #---------------------------------------
@ -256,8 +259,7 @@ elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/spu2-x")
set(spu2-x FALSE) set(spu2-x FALSE)
else() else()
set(spu2-x FALSE) set(spu2-x FALSE)
message(STATUS "Skip build of spu2-x: miss some dependencies") print_dep("Skip build of spu2-x: miss some dependencies" "${msg_dep_spu2x}")
message(STATUS "${msg_dep_spu2x}")
endif() endif()
#--------------------------------------- #---------------------------------------
@ -278,8 +280,7 @@ if(EXTRA_PLUGINS)
set(zerospu2 FALSE) set(zerospu2 FALSE)
else() else()
set(zerospu2 FALSE) set(zerospu2 FALSE)
message(STATUS "Skip build of zerospu2: miss some dependencies") print_dep("Skip build of zerospu2: miss some dependencies" "${msg_dep_zerospu2}")
message(STATUS "${msg_dep_zerospu2}")
endif() endif()
endif() endif()
#--------------------------------------- #---------------------------------------