Commit Athostr's latest patch to the cmake build support to svn. Standardizes the CMakeList files a bit, copies ps2hw.dat in to plugins, preliminary PortAudio support. Only uses the builtin SoundTouch now.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2467 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2010-01-22 04:36:49 +00:00
parent 242311ab1f
commit b64452f074
22 changed files with 677 additions and 550 deletions

View File

@ -1,18 +1,18 @@
# make bzip2
# build local bzip2
if(localBZip2)
# build project bzip2
if(projectBZip2)
add_subdirectory(bzip2)
endif(localBZip2)
endif(projectBZip2)
# make zlib
# build local zlib
if(localZLIB)
# build project zlib
if(projectZLIB)
add_subdirectory(zlib)
endif(localZLIB)
endif(projectZLIB)
# make SoundTouch
if(localSoundTouch)
if(projectSoundTouch)
add_subdirectory(SoundTouch)
endif(localSoundTouch)
endif(projectSoundTouch)

View File

@ -3,6 +3,24 @@
# library name
set(SoundTouchName SoundTouch)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-g -O0 -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-O1 -g -W -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(SoundTouchSources
AAFilter.cpp
@ -24,30 +42,12 @@ set(SoundTouchHeaders
FIFOSamplePipe.h
FIRFilter.h
RateTransposer.h
SITypes.h
STTypes.h
SoundTouch.h
TDStretch.h
WavFile.h
cpu_detect.h)
# add library
add_library(${SoundTouchName} STATIC ${SoundTouchSources})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-O1 -g -W -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_DEVEL "-O1 -g -W -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_RELEASE "-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Release)
add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})

View File

@ -3,6 +3,24 @@
# library name
set(bzip2Name bzip2)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-g -O0 -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-O1 -g -W -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(bzip2Sources
blocksort.c
@ -21,22 +39,3 @@ set(bzip2Headers
# add library
add_library(${bzip2Name} STATIC ${bzip2Sources} ${bzip2Headers})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-O1 -g -W -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_DEVEL "-O1 -g -W -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott")
set(CMAKE_CXX_FLAGS_RELEASE "-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott")
endif(CMAKE_BUILD_TYPE STREQUAL Release)

View File

@ -3,6 +3,24 @@
# library name
set(zlibName zlib)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-W -g -O0)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-O2 -W)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-fexpensive-optimizations -O3 -W)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(zlibSources
adler32.c
@ -34,21 +52,3 @@ set(zlibHeaders
# add library
add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-W -g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "-W -g -O0")
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-O2 -W")
set(CMAKE_CXX_FLAGS_DEVEL "-O2 -W")
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-fexpensive-optimizations -O3 -W")
set(CMAKE_CXX_FLAGS_RELEASE "-fexpensive-optimizations -O3 -W")
endif(CMAKE_BUILD_TYPE STREQUAL Release)

View File

@ -42,8 +42,8 @@ add_subdirectory(plugins)
#-------------------------------------------------------------------------------
# Resources
#-------------------------------------------------------------------------------
# This target is used to convert all binary Resources to c/c++-Header files.
# It is always considered as out-of-date, so it is build every time.
# Specify all binary images to convert them into c/c++ header files.
#
#-------------------------------------------------------------------------------
# add resources here
set(resourceList AppIcon16.png

26
cmake/FindPortAudio.cmake Normal file
View File

@ -0,0 +1,26 @@
# Try to find PortAudio
# Once done, this will define
#
# PORTAUDIO_FOUND - system has PortAudio
# PORTAUDIO_INCLUDE_DIR - the PortAudio include directories
# PORTAUDIO_LIBRARIES - link these to use PortAudio
if(PORTAUDIO_INCLUDE_DIR AND PORTAUDIO_LIBRARIES)
set(PORTAUDIO_FIND_QUIETLY TRUE)
endif(PORTAUDIO_INCLUDE_DIR AND PORTAUDIO_LIBRARIES)
# include dir
find_path(PORTAUDIO_INCLUDE_DIR portaudio.h)
# finally the library itself
find_library(libPortAudio NAMES portaudio)
find_library(libPortAudioCpp NAMES portaudiocpp)
set(PORTAUDIO_LIBRARIES ${libPortAudio} ${libPortAudioCpp})
# handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PortAudio DEFAULT_MSG PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR)
mark_as_advanced(PORTAUDIO_LIBRARIES PORTAUDIO_INCLUDE_DIR)

View File

@ -5,22 +5,22 @@
# SOUNDTOUCH_INCLUDE_DIR - the SoundTouch include directories
# SOUNDTOUCH_LIBRARIES - link these to use SoundTouch
if(SoundTouch_INCLUDE_DIR AND SoundTouch_LIBRARIES)
set(SoundTouch_FIND_QUIETLY TRUE)
endif(SoundTouch_INCLUDE_DIR AND SoundTouch_LIBRARIES)
if(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
set(SOUNDTOUCH_FIND_QUIETLY TRUE)
endif(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
# include dir
find_path(SoundTouch_INCLUDE_DIR soundtouch/SoundTouch.h)
find_path(SOUNDTOUCH_INCLUDE_DIR soundtouch/SoundTouch.h)
# finally the library itself
find_library(tmpLibBPM NAMES BPM SoundTouch)
find_library(tmpLibST NAMES SoundTouch)
set(SoundTouch_LIBRARIES ${tmpLibBPM} ${tmpLibST})
find_library(libBPM NAMES BPM)
find_library(libSoundTouch NAMES SoundTouch)
set(SOUNDTOUCH_LIBRARIES ${libBPM} ${libSoundTouch})
# handle the QUIETLY and REQUIRED arguments and set SOUNDTOUCH_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SoundTouch DEFAULT_MSG SoundTouch_LIBRARIES SoundTouch_INCLUDE_DIR)
find_package_handle_standard_args(SoundTouch DEFAULT_MSG SOUNDTOUCH_LIBRARIES SOUNDTOUCH_INCLUDE_DIR)
mark_as_advanced(SoundTouch_LIBRARIES SoundTouch_INCLUDE_DIR)
mark_as_advanced(SOUNDTOUCH_LIBRARIES SOUNDTOUCH_INCLUDE_DIR)

View File

@ -14,7 +14,10 @@ detectOperatingSystem()
#-------------------------------------------------------------------------------
# FindStuff
#-------------------------------------------------------------------------------
if(Linux)
#----------------------------------------
# Required
#----------------------------------------
if(Linux) # Linux only
# gtk required
find_package(GTK2 REQUIRED gtk)
@ -26,6 +29,7 @@ if(Linux)
# message(FATAL_ERROR "GTK2 libraries and include files not found.
# Please install GTK2 version ${minimal_GTK2_version} or higher.")
endif(GTK2_FOUND)
endif(Linux)
#------------------------------------------------------------
@ -44,35 +48,88 @@ endif(wxWidgets_FOUND)
#------------------------------------------------------------
# zlib required
# zlib required (no require flag, because we can use project one as fallback)
find_package(ZLIB)
# if we found zlib on the system, use it else use local one
# if we found zlib on the system, use it else use project one
if(ZLIB_FOUND)
# add zlib include directories
include_directories(${ZLIB_INCLUDE_DIRS})
else(ZLIB_FOUND)
# use locale one
set(localZLIB TRUE)
# use project one
set(projectZLIB TRUE)
endif(ZLIB_FOUND)
#------------------------------------------------------------
#----------------------------------------
# Optional
#----------------------------------------
if(Linux) # Linux only
# x11 optional
find_package(X11)
# x11 found
if(X11_FOUND)
# add x11 include directories
include_directories(${X11_INCLUDE_DIR})
#else(X11_FOUND)
# message(FATAL_ERROR "X11 libraries and include files not found.
# Please install X11.")
endif(X11_FOUND)
endif(Linux)
#------------------------------------------------------------
# ALSA optional
find_package(ALSA)
# ALSA found
if(ALSA_FOUND)
# add ALSA include directories
include_directories(${ALSA_INCLUDE_DIRS})
endif(ALSA_FOUND)
#------------------------------------------------------------
# bzip2 optional
find_package(BZip2)
# if we found bzip2 on the system,
# use it else use local one
# use it else use project one
if(BZIP2_FOUND)
# add zlib include directories
include_directories(${BZIP2_INCLUDE_DIR})
else(BZIP2_FOUND)
# use locale one
set(localBZip2 TRUE)
# use project one
set(projectBZip2 TRUE)
endif(BZIP2_FOUND)
#------------------------------------------------------------
# Cg optional
include(${PROJECT_SOURCE_DIR}/cmake/FindCg.cmake)
# found Cg
if(CG_FOUND)
# add Cg include directories
include_directories(${CG_INCLUDE_DIR})
endif(CG_FOUND)
#------------------------------------------------------------
# GLEW optional
include(${PROJECT_SOURCE_DIR}/cmake/FindGlew.cmake)
# found GLEW
if(GLEW_FOUND)
# add GLEW include directories
include_directories(${GLEW_INCLUDE_PATH})
endif(GLEW_FOUND)
#------------------------------------------------------------
# OpenGL optional
find_package(OpenGL)
@ -84,6 +141,17 @@ endif(OPENGL_FOUND)
#------------------------------------------------------------
# PortAudio optional
include(${PROJECT_SOURCE_DIR}/cmake/FindPortAudio.cmake)
# found PortAudio
if(PORTAUDIO_FOUND)
# add PortAudio include directories
include_directories(${PORTAUDIO_INCLUDE_DIR})
endif(PORTAUDIO_FOUND)
#------------------------------------------------------------
# SDL optional
find_package(SDL)
@ -95,15 +163,16 @@ endif(SDL_FOUND)
#------------------------------------------------------------
include(${PROJECT_SOURCE_DIR}/cmake/FindSoundTouch.cmake)
# SoundTouch optional
#include(${PROJECT_SOURCE_DIR}/cmake/FindSoundTouch.cmake)
# found SoundTouch
if(SOUNDTOUCH_FOUND)
# add SoundTouch include directories
include_directories(${SoundTouch_INCLUDE_DIR})
include_directories(${SOUNDTOUCH_INCLUDE_DIR})
else(SOUNDTOUCH_FOUND)
# use local one
set(localSoundTouch TRUE)
# use project one
set(projectSoundTouch TRUE)
# found
set(SOUNDTOUCH_FOUND TRUE)
@ -111,26 +180,15 @@ endif(SOUNDTOUCH_FOUND)
#------------------------------------------------------------
include(${PROJECT_SOURCE_DIR}/cmake/FindCg.cmake)
# Subversion optional
find_package(Subversion)
# found Cg
if(CG_FOUND)
# add Cg include directories
include_directories(${CG_INCLUDE_DIR})
endif(CG_FOUND)
#------------------------------------------------------------
# ALSA optional
find_package(ALSA)
# ALSA found
if(ALSA_FOUND)
# add ALSA include directories
include_directories(${ALSA_INCLUDE_DIRS})
endif(ALSA_FOUND)
#------------------------------------------------------------
# subversion found
if(Subversion_FOUND)
set(SVN TRUE)
else(Subversion_FOUND)
set(SVN FALSE)
endif(Subversion_FOUND)
#-------------------------------------------------------------------------------
# Plugins
@ -185,7 +243,7 @@ set(USBnull TRUE)
#---------------------------------------
# onepad
#---------------------------------------
# requires: SDL
# requires: -SDL
#---------------------------------------
if(SDL_FOUND)
set(onepad TRUE)
@ -197,7 +255,7 @@ endif(SDL_FOUND)
#---------------------------------------
# spu2-x
#---------------------------------------
# requires: SoundTouch
# requires: -SoundTouch
#---------------------------------------
if(SOUNDTOUCH_FOUND)
set(spu2-x TRUE)
@ -209,20 +267,23 @@ endif(SOUNDTOUCH_FOUND)
#---------------------------------------
# zerogs
#---------------------------------------
# requires:OpenGL
# requires: -GLEW
# -OpenGL
# -X11
#---------------------------------------
if(OPENGL_FOUND)
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
set(zerogs TRUE)
else(OPENGL_FOUND)
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
set(zerogs FALSE)
endif(OPENGL_FOUND)
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
#---------------------------------------
#---------------------------------------
# zerospu2
#---------------------------------------
# requires: SoundTouch
# ALSA
# requires: -SoundTouch
# -ALSA
# -PortAudio
#---------------------------------------
if(SOUNDTOUCH_FOUND AND ALSA_FOUND)
set(zerospu2 TRUE)

View File

@ -3,6 +3,102 @@
# library name
set(UtilitiesName Utilities)
# set common flags
set(CommonFlags
-m32
-march=i486
-msse
-msse2
-fno-dse
-fno-guess-branch-probability
-fno-strict-aliasing
-fno-tree-dse
-pipe
-Wno-format
-Wno-unused-parameter
-Wno-unused-value
-Wunused-variable)
# set warning flags
set(DebugFlags
-g
-W)
# set linker flags
set(LinkerFlags
-s)
# set optimization flags
set(OptimizationFlags
-falign-functions
-falign-jumps
-falign-labels
-falign-loops
-fcaller-saves
-fcprop-registers
-fcrossjumping
-fcse-follow-jumps
-fcse-skip-blocks
-fdefer-pop
-fdelete-null-pointer-checks
-fgcse
-fgcse-lm
-fif-conversion
-fif-conversion2
-fmerge-constants
-foptimize-sibling-calls
-fpeephole2
-fregmove
-freorder-blocks
-freorder-functions
-frerun-cse-after-loop
-fsched-interblock
-fsched-spec
-fstrict-overflow
-fthread-jumps
-ftree-ccp
-ftree-ch
-ftree-copyrename
-ftree-dce
-ftree-dominator-opts
-ftree-fre
-ftree-lrs
-ftree-pre
-ftree-sra
-ftree-ter
-ftree-vrp
-funit-at-a-time)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# clear flags
set(CMAKE_C_FLAGS_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG)
# add defines
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# clear flags
set(CMAKE_C_FLAGS_DEVEL)
set(CMAKE_CXX_FLAGS_DEVEL)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# clear flags
set(CMAKE_C_FLAGS_RELEASE)
set(CMAKE_CXX_FLAGS_RELEASE)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(UtilitiesSources
../../include/Utilities/EventSource.inl
@ -67,39 +163,6 @@ set_source_files_properties(${UtilitiesSSources} PROPERTIES LANGUAGE CXX)
# add library
add_library(${UtilitiesName} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${UtilitiesSSources})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-W -g -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32")
set(CMAKE_CXX_FLAGS_DEBUG "-W -g -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32")
# add defines
add_definitions(-DPCSX2_DEVBUILD -DPCSX2_DEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32")
set(CMAKE_CXX_FLAGS_DEVEL "-fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32")
# add defines
add_definitions(-DPCSX2_DEVBUILD -DPCSX2_DEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${UtilitiesName} ${wxWidgets_LIBRARIES})
# add additional include directories
include_directories(.)

View File

@ -3,6 +3,103 @@
# library name
set(x86emitterName x86emitter)
# set common flags
set(CommonFlags
-fno-guess-branch-probability
-fno-dse
-fno-tree-dse
-fno-strict-aliasing
-m32
-march=i486
-msse
-msse2
-pipe
-Wno-format
-Wno-unused-parameter
-Wno-unused-value
-Wunused-variable)
# set warning flags
set(DebugFlags
-W
-g)
# set linker flags
set(LinkerFlags
-s)
# set optimization flags
set(OptimizationFlags
-falign-functions
-falign-jumps
-falign-labels
-falign-loops
-fcaller-saves
-fcprop-registers
-fcrossjumping
-fcse-follow-jumps
-fcse-skip-blocks
-fdefer-pop
-fdelete-null-pointer-checks
-fgcse
-fgcse-lm
-fif-conversion
-fif-conversion2
-fmerge-constants
-foptimize-sibling-calls
-fpeephole2
-fregmove
-freorder-blocks
-freorder-functions
-frerun-cse-after-loop
-fsched-interblock
-fsched-spec
-fstrict-overflow
-fthread-jumps
-ftree-ccp
-ftree-ch
-ftree-copyrename
-ftree-dce
-ftree-dominator-opts
-ftree-fre
-ftree-lrs
-ftree-pre
-ftree-sra
-ftree-ter
-ftree-vrp
-funit-at-a-time)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# clear flags
set(CMAKE_C_FLAGS_DEBUG)
set(CMAKE_CXX_FLAGS_DEBUG)
# add defines
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# clear flags
set(CMAKE_C_FLAGS_DEVEL)
set(CMAKE_CXX_FLAGS_DEVEL)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# clear flags
set(CMAKE_C_FLAGS_RELEASE)
set(CMAKE_CXX_FLAGS_RELEASE)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(x86emitterSources
../../include/x86emitter/inlines.inl
@ -38,7 +135,6 @@ set(x86emitterHeaders
../../include/x86emitter/implement/simd_templated_helpers
../../include/x86emitter/implement/test.h
../../include/x86emitter/implement/xchg.h
# ../../include/x86emitter/implement/xmm/
../../include/x86emitter/instructions.h
../../include/x86emitter/internal.h
../../include/x86emitter/legacy_instructions.h
@ -54,40 +150,6 @@ set(x86emitterHeaders
# add library
add_library(${x86emitterName} STATIC ${x86emitterSources} ${x86emitterHeaders})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -W -g")
set(CMAKE_CXX_FLAGS_DEBUG "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -W -g")
# add defines
add_definitions(-DPCSX2_DEVBUILD -DPCSX2_DEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre")
set(CMAKE_CXX_FLAGS_DEVEL "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre")
# add defines
add_definitions(-DPCSX2_DEVBUILD -DPCSX2_DEBUG)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -s")
set(CMAKE_CXX_FLAGS_RELEASE "-march=i486 -Wno-format -Wno-unused-parameter -Wno-unused-value -Wunused-variable -fno-guess-branch-probability -fno-dse -fno-tree-dse -fno-strict-aliasing -pipe -msse -msse2 -m32 -fdefer-pop -fcprop-registers -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce -ftree-dominator-opts -ftree-ter -ftree-lrs -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time -fmerge-constants -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks -fgcse -fgcse-lm -frerun-cse-after-loop -fcaller-saves -fpeephole2 -fsched-interblock -fsched-spec -fregmove -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks -freorder-functions -falign-functions -falign-jumps -falign-loops -falign-labels -ftree-vrp -ftree-pre -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${x86emitterName} ${wxWidgets_LIBRARIES})
# add additional include directories
include_directories(../../include
../../include/x86emitter)

View File

@ -89,7 +89,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(pcsx2Name pcsx2-dev)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG -DWX_PRECOMP)
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL -DWX_PRECOMP)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
@ -105,6 +105,18 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# get svn revision and generate svnrev.h
if(SVN)
# execute subversion
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
else(SVN)
# write svnrev.h
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
endif(SVN)
# variable with sources of this executable
set(pcsx2Sources
Cache.cpp
@ -515,9 +527,6 @@ set(pcsx2SSources
IPU/acoroutine.S
x86/aVUzerorec.S)
# set runtime output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
# change language of .S-files to c++
set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
@ -564,16 +573,20 @@ if(MacOSX)
)
endif(MacOSX)
# additonal include directories
include_directories(.
gui
x86
${CMAKE_BINARY_DIR}/pcsx2)
# set runtime output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
# add executable
add_executable(${pcsx2Name}
${Common}
${Platform})
# additonal include directories
include_directories(.
gui
x86)
# add dependencies
add_dependencies(${pcsx2Name} Resources)
@ -589,9 +602,9 @@ if(Linux)
endif(Linux)
# link target with zlib
if(localZLIB)
if(projectZLIB)
target_link_libraries(${pcsx2Name} zlib)
else(localZLIB)
else(projectZLIB)
target_link_libraries(${pcsx2Name} ${ZLIB_LIBRARIES})
endif(localZLIB)
endif(projectZLIB)

View File

@ -3,6 +3,24 @@
# plugin name
set(CDVDnullName CDVDnull)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# CDVDnull sources
set(CDVDnullSources
CDVD.cpp)
@ -34,48 +52,17 @@ set(CDVDnullWindowsSources
set(CDVDnullWindowsHeaders
)
# add additional include directories
include_directories(.)
# add library
add_library(${CDVDnullName} SHARED
${CDVDnullSources}
${CDVDnullHeaders}
${CDVDnullLinuxSources}
${CDVDnullLinuxHeaders}
)
${CDVDnullLinuxHeaders})
# set output directory
set_target_properties(${CDVDnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${CDVDnullName})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,6 +3,24 @@
# plugin name
set(FWnullName FWnull)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# FWnull sources
set(FWnullSources
Config.cpp
@ -32,6 +50,9 @@ set(FWnullWindowsSources
set(FWnullWindowsHeaders
Windows/resource.h)
# add additional include directories
include_directories(.)
# add library
add_library(${FWnullName} SHARED
${FWnullSources}
@ -43,37 +64,3 @@ add_library(${FWnullName} SHARED
set_target_properties(${FWnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${FWnullName})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,6 +3,24 @@
# plugin name
set(GSnullName GSnull)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -msse2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# GSnull sources
set(GSnullSources
GifTransfer.cpp
@ -52,6 +70,9 @@ set(GSnullWindowsSources
set(GSnullWindowsHeaders
)
# add additional include directories
include_directories(.)
# add library
add_library(${GSnullName} SHARED
${GSnullSources}
@ -65,37 +86,3 @@ add_library(${GSnullName} SHARED
set_target_properties(${GSnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -msse2 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -msse2 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -msse2 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -msse2 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -msse2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -msse2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${GSnullName})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,6 +3,24 @@
# plugin name
set(PadNullName PadNull)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# PadNull sources
set(PadNullSources
Pad.cpp)
@ -39,6 +57,10 @@ set(PadNullWindowsHeaders
Windows/PadWin.h
Windows/resource.h)
# add additional include directories
include_directories(.
Linux)
# add library
add_library(${PadNullName} SHARED
${PadNullSources}
@ -50,38 +72,3 @@ add_library(${PadNullName} SHARED
set_target_properties(${PadNullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${PadNullName})
# add additional include directories
include_directories(.
../../common/include
Linux)

View File

@ -3,6 +3,24 @@
# plugin name
set(SPU2nullName SPU2null)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# SPU2null sources
set(SPU2nullSources
SPU2.cpp)
@ -36,6 +54,9 @@ set(SPU2nullWindowsSources
set(SPU2nullWindowsHeaders
Windows/resource.h)
# add additional include directories
include_directories(.)
# add library
add_library(${SPU2nullName} SHARED
${SPU2nullSources}
@ -47,37 +68,3 @@ add_library(${SPU2nullName} SHARED
set_target_properties(${SPU2nullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${SPU2nullName})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,6 +3,24 @@
# plugin name
set(USBnullName USBnull)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# USBnull sources
set(USBnullSources
Config.cpp
@ -32,6 +50,9 @@ set(USBnullWindowsSources
set(USBnullWindowsHeaders
Windows/resource.h)
# additonal include directories
include_directories(.)
# add library
add_library(${USBnullName} SHARED
${USBnullSources}
@ -43,37 +64,3 @@ add_library(${USBnullName} SHARED
set_target_properties(${USBnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
target_link_libraries(${USBnullName})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,6 +3,24 @@
# plugin name
set(dev9nullName dev9null)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# dev9null sources
set(dev9nullSources
Config.cpp
@ -29,6 +47,9 @@ set(dev9nullWindowsSources
set(dev9nullWindowsHeaders
)
# additional include directories
include_directories(.)
# add library
add_library(${dev9nullName} SHARED
${dev9nullSources}
@ -40,30 +61,3 @@ add_library(${dev9nullName} SHARED
set_target_properties(${dev9nullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)

View File

@ -3,6 +3,24 @@
# plugin name
set(onepadName onepad)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# onepad sources
set(onepadSources
analog.cpp
@ -43,6 +61,9 @@ set(onepadWindowsSources
set(onepadWindowsHeaders
)
# add additional include directories
include_directories(.)
# add library
add_library(${onepadName} SHARED
${onepadSources}
@ -54,37 +75,6 @@ add_library(${onepadName} SHARED
set_target_properties(${onepadName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -fPIC -m32 -g")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -fPIC -m32 -O2")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fPIC -m32 -O2 -s")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with wx
# link target with SDL
target_link_libraries(${onepadName} ${SDL_LIBRARY})
# add additional include directories
include_directories(.
../../common/include)

View File

@ -3,8 +3,23 @@
# plugin name
set(zerogsName zerogs)
include(${PROJECT_SOURCE_DIR}/cmake/FindGlew.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/FindCg.cmake)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -m32 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -m32 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -m32 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# zerogs sources
set(zerogsSources
@ -80,6 +95,9 @@ set(zerogsWindowsHeaders
# change language of .S-files to c++
set_source_files_properties(${zerogsSSources} PROPERTIES LANGUAGE CXX)
# add additional include directories
include_directories(.)
# add library
add_library(${zerogsName} SHARED
${zerogsSources}
@ -93,39 +111,22 @@ add_library(${zerogsName} SHARED
set_target_properties(${zerogsName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-Wall -m32 -g")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -m32 -g")
# copy ps2hw.dat to plugins folder
add_custom_command(TARGET ${zerogsName} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/plugins/zerogs/opengl/Win32/ps2hw.dat ${PROJECT_SOURCE_DIR}/bin/plugins)
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# link target with Cg
target_link_libraries(${zerogsName} ${CG_LIBRARIES})
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-Wall -m32 -O2")
set(CMAKE_CXX_FLAGS_DEVEL "-Wall -m32 -O2")
# link target with glew
target_link_libraries(${zerogsName} ${GLEW_LIBRARY})
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# link target with opengl
target_link_libraries(${zerogsName} ${OPENGL_LIBRARIES})
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-Wall -m32 -O2 -s")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -m32 -O2 -s")
# link target with X11
target_link_libraries(${zerogsName} ${X11_LIBRARIES})
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with
target_link_libraries(${zerogsName} ${GLEW_LIBRARY} ${CG_LIBRARIES})
# add additional include directories
include_directories(.
${GLEW_INCLUDE_PATH}
${CG_INCLUDE_DIRS}
../../../common/include)
# link target with X11 videomod
target_link_libraries(${zerogsName} ${X11_Xxf86vm_LIB})

View File

@ -3,6 +3,24 @@
# plugin name
set(zerospu2Name zerospu2)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# zerospu2 sources
set(zerospu2Sources
voices.cpp
@ -49,6 +67,11 @@ set(zerospu2WindowsHeaders
resources.h
Targets/dsound51.h)
# add additional include directories
include_directories(.
Linux
Targets)
# add library
add_library(${zerospu2Name} SHARED
${zerospu2Sources}
@ -60,36 +83,18 @@ add_library(${zerospu2Name} SHARED
set_target_properties(${zerospu2Name} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -O2)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-Wall -fPIC -m32 -msse2 -O2 -s)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# link target with ALSA
target_link_libraries(${zerospu2Name} ${ALSA_LIBRARIES})
# link target with SoundTouch
if(localSoundTouch)
target_link_libraries(${zerospu2Name} SoundTouch)
else(localSoundTouch)
target_link_libraries(${zerospu2Name} ${SOUNDTOUCH_LIBRARIES})
endif(localSoundTouch)
if(PORTAUDIO_FOUND)
# link target with PortAudio
#target_link_libraries(${zerospu2Name} ${PORTAUDIO_LIBRARIES})
endif(PORTAUDIO_FOUND)
# link target with SoundTouch
if(projectSoundTouch)
target_link_libraries(${zerospu2Name} SoundTouch)
else(projectSoundTouch)
target_link_libraries(${zerospu2Name} ${SOUNDTOUCH_LIBRARIES})
endif(projectSoundTouch)
# add additional include directories
include_directories(.
./Target
./Linux
../../../common/include)

View File

@ -3,6 +3,24 @@
# executable name
set(bin2cppName bin2cpp)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(-O2 -s -Wall -fexceptions)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(-O2 -s -Wall -fexceptions)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(-O2 -s -Wall -fexceptions)
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this executable
set(bin2cppSources
bin2cpp.cpp)
@ -13,33 +31,6 @@ set(bin2cppHeaders
# add executable
add_executable(${bin2cppName} ${bin2cppSources} ${bin2cppHeaders})
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(CMAKE_C_FLAGS_DEBUG "-O2 -s -Wall -fexceptions")
set(CMAKE_CXX_FLAGS_DEBUG "-O2 -s -Wall -fexceptions")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
set(CMAKE_C_FLAGS_DEVEL "-O2 -s -Wall -fexceptions")
set(CMAKE_CXX_FLAGS_DEVEL "-O2 -s -Wall -fexceptions")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
set(CMAKE_C_FLAGS_RELEASE "-O2 -s -Wall -fexceptions")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -s -Wall -fexceptions")
# add defines
add_definitions()
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# set output directory
set_target_properties(${bin2cppName} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools/bin)