* Print a fatal_error when users do not source the good CMakeLists file.
* Do not search system libraries if the user force the internal libraries


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3269 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2010-06-22 13:30:36 +00:00
parent b8267258bf
commit 3d9c63b0f0
21 changed files with 144 additions and 23 deletions

View File

@ -1,3 +1,11 @@
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# build project zlib
if(projectZLIB)
add_subdirectory(zlib)

View File

@ -4,6 +4,9 @@ project(Pcsx2)
# need cmake version >=2.6
cmake_minimum_required(VERSION 2.6)
# Variable to check that people use the good file
set(TOP_CMAKE_WAS_SOURCED TRUE)
# set module path
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

View File

@ -21,12 +21,16 @@ set(SDL_BUILDING_LIBRARY TRUE)
find_package(SDL)
find_package(Subversion)
find_package(wxWidgets REQUIRED base core adv)
find_package(ZLIB)
if(NOT FORCE_INTERNAL_ZLIB)
find_package(ZLIB)
endif(NOT FORCE_INTERNAL_ZLIB)
# Use pcsx2 package to find module
include(FindA52)
include(FindCg)
include(FindGlew)
include(FindPortAudio)
if(NOT FORCE_INTERNAL_SOUNDTOUCH)
include(FindPortAudio)
endif(NOT FORCE_INTERNAL_SOUNDTOUCH)
include(FindSoundTouch)
include(FindSparseHash)
@ -47,6 +51,7 @@ if(NOT ZLIB_FOUND OR FORCE_INTERNAL_ZLIB)
# Set path
set(ZLIB_LIBRARIES pcsx2_zlib)
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/zlib)
message(STATUS "Use internal pcsx2 zlib library")
endif(NOT ZLIB_FOUND OR FORCE_INTERNAL_ZLIB)
if(NOT SOUNDTOUCH_FOUND OR FORCE_INTERNAL_SOUNDTOUCH)
@ -55,8 +60,8 @@ if(NOT SOUNDTOUCH_FOUND OR FORCE_INTERNAL_SOUNDTOUCH)
set(SOUNDTOUCH_FOUND TRUE)
# Set path
set(SOUNDTOUCH_LIBRARIES pcsx2_SoundTouch)
# include_directories(${PROJECT_SOURCE_DIR}/3rdparty/SoundTouch)
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/soundtouch_linux_include)
message(STATUS "Use internal pcsx2 SoundTouch library")
endif(NOT SOUNDTOUCH_FOUND OR FORCE_INTERNAL_SOUNDTOUCH)
#----------------------------------------

View File

@ -1,7 +1,13 @@
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# make Utilities
add_subdirectory(Utilities)
# make x86emitter
add_subdirectory(x86emitter)

View File

@ -1,4 +1,10 @@
# Utilities library
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# library name
set(UtilitiesName Utilities)

View File

@ -1,4 +1,10 @@
# x86emitter library
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# library name
set(x86emitterName x86emitter)

View File

@ -1,4 +1,10 @@
# pcsx2
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# Clear default flags
set(CMAKE_C_FLAGS "")

View File

@ -1,4 +1,10 @@
# CDVDiso Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(CDVDisoName CDVDiso)

View File

@ -1,4 +1,10 @@
# CDVDnull Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(CDVDnullName CDVDnull)

View File

@ -1,4 +1,10 @@
# Plugins
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# make cdvdGigaherz
#if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/cdvdGigaherz" AND cdvdGigaherz)

View File

@ -1,4 +1,10 @@
# FWnull Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(FWnullName FWnull)

View File

@ -1,4 +1,10 @@
# GSnull Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(GSnullName GSnull)

View File

@ -1,7 +1,10 @@
# PadNull Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(PadNullName PadNull)
set(CommonFlags
-Wall

View File

@ -1,4 +1,10 @@
# SPU2null Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(SPU2nullName SPU2null)

View File

@ -1,4 +1,10 @@
# USBnull Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(USBnullName USBnull)

View File

@ -1,4 +1,10 @@
# dev9null Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(dev9nullName dev9null)

View File

@ -1,4 +1,10 @@
# onepad Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(onepadName onepad)

View File

@ -1,4 +1,10 @@
# spu2x Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(spu2xName spu2x)

View File

@ -1,4 +1,10 @@
# zeropad Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(zeropadName zeropad)

View File

@ -1,4 +1,10 @@
# zerospu2 Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# plugin name
set(zerospu2Name zerospu2)

View File

@ -1,4 +1,10 @@
# zzogl Plugin
# 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 advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
# Clear default flags
set(CMAKE_C_FLAGS "")