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 # make bzip2
# build local bzip2 # build project bzip2
if(localBZip2) if(projectBZip2)
add_subdirectory(bzip2) add_subdirectory(bzip2)
endif(localBZip2) endif(projectBZip2)
# make zlib # make zlib
# build local zlib # build project zlib
if(localZLIB) if(projectZLIB)
add_subdirectory(zlib) add_subdirectory(zlib)
endif(localZLIB) endif(projectZLIB)
# make SoundTouch # make SoundTouch
if(localSoundTouch) if(projectSoundTouch)
add_subdirectory(SoundTouch) add_subdirectory(SoundTouch)
endif(localSoundTouch) endif(projectSoundTouch)

View File

@ -3,6 +3,24 @@
# library name # library name
set(SoundTouchName SoundTouch) 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 # variable with all sources of this library
set(SoundTouchSources set(SoundTouchSources
AAFilter.cpp AAFilter.cpp
@ -24,30 +42,12 @@ set(SoundTouchHeaders
FIFOSamplePipe.h FIFOSamplePipe.h
FIRFilter.h FIRFilter.h
RateTransposer.h RateTransposer.h
SITypes.h STTypes.h
SoundTouch.h SoundTouch.h
TDStretch.h TDStretch.h
WavFile.h WavFile.h
cpu_detect.h) cpu_detect.h)
# add library # add library
add_library(${SoundTouchName} STATIC ${SoundTouchSources}) add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
# 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 # library name
set(bzip2Name bzip2) 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 # variable with all sources of this library
set(bzip2Sources set(bzip2Sources
blocksort.c blocksort.c
@ -21,22 +39,3 @@ set(bzip2Headers
# add library # add library
add_library(${bzip2Name} STATIC ${bzip2Sources} ${bzip2Headers}) 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 # library name
set(zlibName zlib) 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 # variable with all sources of this library
set(zlibSources set(zlibSources
adler32.c adler32.c
@ -34,21 +52,3 @@ set(zlibHeaders
# add library # add library
add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders}) 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 # Resources
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# This target is used to convert all binary Resources to c/c++-Header files. # Specify all binary images to convert them into c/c++ header files.
# It is always considered as out-of-date, so it is build every time. #
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# add resources here # add resources here
set(resourceList AppIcon16.png 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_INCLUDE_DIR - the SoundTouch include directories
# SOUNDTOUCH_LIBRARIES - link these to use SoundTouch # SOUNDTOUCH_LIBRARIES - link these to use SoundTouch
if(SoundTouch_INCLUDE_DIR AND SoundTouch_LIBRARIES) if(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
set(SoundTouch_FIND_QUIETLY TRUE) set(SOUNDTOUCH_FIND_QUIETLY TRUE)
endif(SoundTouch_INCLUDE_DIR AND SoundTouch_LIBRARIES) endif(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
# include dir # include dir
find_path(SoundTouch_INCLUDE_DIR soundtouch/SoundTouch.h) find_path(SOUNDTOUCH_INCLUDE_DIR soundtouch/SoundTouch.h)
# finally the library itself # finally the library itself
find_library(tmpLibBPM NAMES BPM SoundTouch) find_library(libBPM NAMES BPM)
find_library(tmpLibST NAMES SoundTouch) find_library(libSoundTouch NAMES SoundTouch)
set(SoundTouch_LIBRARIES ${tmpLibBPM} ${tmpLibST}) set(SOUNDTOUCH_LIBRARIES ${libBPM} ${libSoundTouch})
# handle the QUIETLY and REQUIRED arguments and set SOUNDTOUCH_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set SOUNDTOUCH_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
include(FindPackageHandleStandardArgs) 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 # FindStuff
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
if(Linux) #----------------------------------------
# Required
#----------------------------------------
if(Linux) # Linux only
# gtk required # gtk required
find_package(GTK2 REQUIRED gtk) find_package(GTK2 REQUIRED gtk)
@ -24,8 +27,9 @@ if(Linux)
include_directories(${GTK2_INCLUDE_DIRS}) include_directories(${GTK2_INCLUDE_DIRS})
#else(GTK2_FOUND) #else(GTK2_FOUND)
# message(FATAL_ERROR "GTK2 libraries and include files not found. # message(FATAL_ERROR "GTK2 libraries and include files not found.
# Please install GTK2 version ${minimal_GTK2_version} or higher.") # Please install GTK2 version ${minimal_GTK2_version} or higher.")
endif(GTK2_FOUND) endif(GTK2_FOUND)
endif(Linux) 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) 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) if(ZLIB_FOUND)
# add zlib include directories # add zlib include directories
include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${ZLIB_INCLUDE_DIRS})
else(ZLIB_FOUND) else(ZLIB_FOUND)
# use locale one # use project one
set(localZLIB TRUE) set(projectZLIB TRUE)
endif(ZLIB_FOUND) 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 # bzip2 optional
find_package(BZip2) find_package(BZip2)
# if we found bzip2 on the system, # if we found bzip2 on the system,
# use it else use local one # use it else use project one
if(BZIP2_FOUND) if(BZIP2_FOUND)
# add zlib include directories # add zlib include directories
include_directories(${BZIP2_INCLUDE_DIR}) include_directories(${BZIP2_INCLUDE_DIR})
else(BZIP2_FOUND) else(BZIP2_FOUND)
# use locale one # use project one
set(localBZip2 TRUE) set(projectBZip2 TRUE)
endif(BZIP2_FOUND) 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 # OpenGL optional
find_package(OpenGL) 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 # SDL optional
find_package(SDL) 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 # found SoundTouch
if(SOUNDTOUCH_FOUND) if(SOUNDTOUCH_FOUND)
# add SoundTouch include directories # add SoundTouch include directories
include_directories(${SoundTouch_INCLUDE_DIR}) include_directories(${SOUNDTOUCH_INCLUDE_DIR})
else(SOUNDTOUCH_FOUND) else(SOUNDTOUCH_FOUND)
# use local one # use project one
set(localSoundTouch TRUE) set(projectSoundTouch TRUE)
# found # found
set(SOUNDTOUCH_FOUND TRUE) 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 # subversion found
if(CG_FOUND) if(Subversion_FOUND)
# add Cg include directories set(SVN TRUE)
include_directories(${CG_INCLUDE_DIR}) else(Subversion_FOUND)
endif(CG_FOUND) set(SVN FALSE)
endif(Subversion_FOUND)
#------------------------------------------------------------
# ALSA optional
find_package(ALSA)
# ALSA found
if(ALSA_FOUND)
# add ALSA include directories
include_directories(${ALSA_INCLUDE_DIRS})
endif(ALSA_FOUND)
#------------------------------------------------------------
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Plugins # Plugins
@ -185,7 +243,7 @@ set(USBnull TRUE)
#--------------------------------------- #---------------------------------------
# onepad # onepad
#--------------------------------------- #---------------------------------------
# requires: SDL # requires: -SDL
#--------------------------------------- #---------------------------------------
if(SDL_FOUND) if(SDL_FOUND)
set(onepad TRUE) set(onepad TRUE)
@ -197,7 +255,7 @@ endif(SDL_FOUND)
#--------------------------------------- #---------------------------------------
# spu2-x # spu2-x
#--------------------------------------- #---------------------------------------
# requires: SoundTouch # requires: -SoundTouch
#--------------------------------------- #---------------------------------------
if(SOUNDTOUCH_FOUND) if(SOUNDTOUCH_FOUND)
set(spu2-x TRUE) set(spu2-x TRUE)
@ -209,20 +267,23 @@ endif(SOUNDTOUCH_FOUND)
#--------------------------------------- #---------------------------------------
# zerogs # zerogs
#--------------------------------------- #---------------------------------------
# requires:OpenGL # requires: -GLEW
# -OpenGL
# -X11
#--------------------------------------- #---------------------------------------
if(OPENGL_FOUND) if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
set(zerogs TRUE) set(zerogs TRUE)
else(OPENGL_FOUND) else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
set(zerogs FALSE) set(zerogs FALSE)
endif(OPENGL_FOUND) endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND)
#--------------------------------------- #---------------------------------------
#--------------------------------------- #---------------------------------------
# zerospu2 # zerospu2
#--------------------------------------- #---------------------------------------
# requires: SoundTouch # requires: -SoundTouch
# ALSA # -ALSA
# -PortAudio
#--------------------------------------- #---------------------------------------
if(SOUNDTOUCH_FOUND AND ALSA_FOUND) if(SOUNDTOUCH_FOUND AND ALSA_FOUND)
set(zerospu2 TRUE) set(zerospu2 TRUE)

View File

@ -3,6 +3,102 @@
# library name # library name
set(UtilitiesName Utilities) 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 # variable with all sources of this library
set(UtilitiesSources set(UtilitiesSources
../../include/Utilities/EventSource.inl ../../include/Utilities/EventSource.inl
@ -67,39 +163,6 @@ set_source_files_properties(${UtilitiesSSources} PROPERTIES LANGUAGE CXX)
# add library # add library
add_library(${UtilitiesName} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${UtilitiesSSources}) 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 # link target with wx
target_link_libraries(${UtilitiesName} ${wxWidgets_LIBRARIES}) target_link_libraries(${UtilitiesName} ${wxWidgets_LIBRARIES})
# add additional include directories
include_directories(.)

View File

@ -3,6 +3,103 @@
# library name # library name
set(x86emitterName x86emitter) 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 # variable with all sources of this library
set(x86emitterSources set(x86emitterSources
../../include/x86emitter/inlines.inl ../../include/x86emitter/inlines.inl
@ -38,7 +135,6 @@ set(x86emitterHeaders
../../include/x86emitter/implement/simd_templated_helpers ../../include/x86emitter/implement/simd_templated_helpers
../../include/x86emitter/implement/test.h ../../include/x86emitter/implement/test.h
../../include/x86emitter/implement/xchg.h ../../include/x86emitter/implement/xchg.h
# ../../include/x86emitter/implement/xmm/
../../include/x86emitter/instructions.h ../../include/x86emitter/instructions.h
../../include/x86emitter/internal.h ../../include/x86emitter/internal.h
../../include/x86emitter/legacy_instructions.h ../../include/x86emitter/legacy_instructions.h
@ -54,40 +150,6 @@ set(x86emitterHeaders
# add library # add library
add_library(${x86emitterName} STATIC ${x86emitterSources} ${x86emitterHeaders}) 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 # link target with wx
target_link_libraries(${x86emitterName} ${wxWidgets_LIBRARIES}) 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) set(pcsx2Name pcsx2-dev)
# add defines # 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) endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build # Release - Build
@ -105,6 +105,18 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP) add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP)
endif(CMAKE_BUILD_TYPE STREQUAL Release) 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 # variable with sources of this executable
set(pcsx2Sources set(pcsx2Sources
Cache.cpp Cache.cpp
@ -515,9 +527,6 @@ set(pcsx2SSources
IPU/acoroutine.S IPU/acoroutine.S
x86/aVUzerorec.S) x86/aVUzerorec.S)
# set runtime output directory
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
# change language of .S-files to c++ # change language of .S-files to c++
set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX) set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
@ -564,16 +573,20 @@ if(MacOSX)
) )
endif(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
add_executable(${pcsx2Name} add_executable(${pcsx2Name}
${Common} ${Common}
${Platform}) ${Platform})
# additonal include directories
include_directories(.
gui
x86)
# add dependencies # add dependencies
add_dependencies(${pcsx2Name} Resources) add_dependencies(${pcsx2Name} Resources)
@ -589,9 +602,9 @@ if(Linux)
endif(Linux) endif(Linux)
# link target with zlib # link target with zlib
if(localZLIB) if(projectZLIB)
target_link_libraries(${pcsx2Name} zlib) target_link_libraries(${pcsx2Name} zlib)
else(localZLIB) else(projectZLIB)
target_link_libraries(${pcsx2Name} ${ZLIB_LIBRARIES}) target_link_libraries(${pcsx2Name} ${ZLIB_LIBRARIES})
endif(localZLIB) endif(projectZLIB)

View File

@ -3,6 +3,24 @@
# plugin name # plugin name
set(CDVDnullName CDVDnull) 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 # CDVDnull sources
set(CDVDnullSources set(CDVDnullSources
CDVD.cpp) CDVD.cpp)
@ -34,48 +52,17 @@ set(CDVDnullWindowsSources
set(CDVDnullWindowsHeaders set(CDVDnullWindowsHeaders
) )
# add additional include directories
include_directories(.)
# add library # add library
add_library(${CDVDnullName} SHARED add_library(${CDVDnullName} SHARED
${CDVDnullSources} ${CDVDnullSources}
${CDVDnullHeaders} ${CDVDnullHeaders}
${CDVDnullLinuxSources} ${CDVDnullLinuxSources}
${CDVDnullLinuxHeaders} ${CDVDnullLinuxHeaders})
)
# set output directory # set output directory
set_target_properties(${CDVDnullName} PROPERTIES set_target_properties(${CDVDnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(FWnullName FWnull) 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 # FWnull sources
set(FWnullSources set(FWnullSources
Config.cpp Config.cpp
@ -32,6 +50,9 @@ set(FWnullWindowsSources
set(FWnullWindowsHeaders set(FWnullWindowsHeaders
Windows/resource.h) Windows/resource.h)
# add additional include directories
include_directories(.)
# add library # add library
add_library(${FWnullName} SHARED add_library(${FWnullName} SHARED
${FWnullSources} ${FWnullSources}
@ -43,37 +64,3 @@ add_library(${FWnullName} SHARED
set_target_properties(${FWnullName} PROPERTIES set_target_properties(${FWnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(GSnullName GSnull) 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 # GSnull sources
set(GSnullSources set(GSnullSources
GifTransfer.cpp GifTransfer.cpp
@ -52,6 +70,9 @@ set(GSnullWindowsSources
set(GSnullWindowsHeaders set(GSnullWindowsHeaders
) )
# add additional include directories
include_directories(.)
# add library # add library
add_library(${GSnullName} SHARED add_library(${GSnullName} SHARED
${GSnullSources} ${GSnullSources}
@ -65,37 +86,3 @@ add_library(${GSnullName} SHARED
set_target_properties(${GSnullName} PROPERTIES set_target_properties(${GSnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(PadNullName PadNull) 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 # PadNull sources
set(PadNullSources set(PadNullSources
Pad.cpp) Pad.cpp)
@ -39,6 +57,10 @@ set(PadNullWindowsHeaders
Windows/PadWin.h Windows/PadWin.h
Windows/resource.h) Windows/resource.h)
# add additional include directories
include_directories(.
Linux)
# add library # add library
add_library(${PadNullName} SHARED add_library(${PadNullName} SHARED
${PadNullSources} ${PadNullSources}
@ -50,38 +72,3 @@ add_library(${PadNullName} SHARED
set_target_properties(${PadNullName} PROPERTIES set_target_properties(${PadNullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(SPU2nullName SPU2null) 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 # SPU2null sources
set(SPU2nullSources set(SPU2nullSources
SPU2.cpp) SPU2.cpp)
@ -36,6 +54,9 @@ set(SPU2nullWindowsSources
set(SPU2nullWindowsHeaders set(SPU2nullWindowsHeaders
Windows/resource.h) Windows/resource.h)
# add additional include directories
include_directories(.)
# add library # add library
add_library(${SPU2nullName} SHARED add_library(${SPU2nullName} SHARED
${SPU2nullSources} ${SPU2nullSources}
@ -47,37 +68,3 @@ add_library(${SPU2nullName} SHARED
set_target_properties(${SPU2nullName} PROPERTIES set_target_properties(${SPU2nullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(USBnullName USBnull) 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 # USBnull sources
set(USBnullSources set(USBnullSources
Config.cpp Config.cpp
@ -32,6 +50,9 @@ set(USBnullWindowsSources
set(USBnullWindowsHeaders set(USBnullWindowsHeaders
Windows/resource.h) Windows/resource.h)
# additonal include directories
include_directories(.)
# add library # add library
add_library(${USBnullName} SHARED add_library(${USBnullName} SHARED
${USBnullSources} ${USBnullSources}
@ -43,37 +64,3 @@ add_library(${USBnullName} SHARED
set_target_properties(${USBnullName} PROPERTIES set_target_properties(${USBnullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(dev9nullName dev9null) 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 # dev9null sources
set(dev9nullSources set(dev9nullSources
Config.cpp Config.cpp
@ -29,6 +47,9 @@ set(dev9nullWindowsSources
set(dev9nullWindowsHeaders set(dev9nullWindowsHeaders
) )
# additional include directories
include_directories(.)
# add library # add library
add_library(${dev9nullName} SHARED add_library(${dev9nullName} SHARED
${dev9nullSources} ${dev9nullSources}
@ -40,30 +61,3 @@ add_library(${dev9nullName} SHARED
set_target_properties(${dev9nullName} PROPERTIES set_target_properties(${dev9nullName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # plugin name
set(onepadName onepad) 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 # onepad sources
set(onepadSources set(onepadSources
analog.cpp analog.cpp
@ -43,6 +61,9 @@ set(onepadWindowsSources
set(onepadWindowsHeaders set(onepadWindowsHeaders
) )
# add additional include directories
include_directories(.)
# add library # add library
add_library(${onepadName} SHARED add_library(${onepadName} SHARED
${onepadSources} ${onepadSources}
@ -54,37 +75,6 @@ add_library(${onepadName} SHARED
set_target_properties(${onepadName} PROPERTIES set_target_properties(${onepadName} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
# Debug - Build # link target with SDL
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(${onepadName} ${SDL_LIBRARY}) target_link_libraries(${onepadName} ${SDL_LIBRARY})
# add additional include directories
include_directories(.
../../common/include)

View File

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

View File

@ -3,6 +3,24 @@
# plugin name # plugin name
set(zerospu2Name zerospu2) 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 # zerospu2 sources
set(zerospu2Sources set(zerospu2Sources
voices.cpp voices.cpp
@ -49,6 +67,11 @@ set(zerospu2WindowsHeaders
resources.h resources.h
Targets/dsound51.h) Targets/dsound51.h)
# add additional include directories
include_directories(.
Linux
Targets)
# add library # add library
add_library(${zerospu2Name} SHARED add_library(${zerospu2Name} SHARED
${zerospu2Sources} ${zerospu2Sources}
@ -60,36 +83,18 @@ add_library(${zerospu2Name} SHARED
set_target_properties(${zerospu2Name} PROPERTIES set_target_properties(${zerospu2Name} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins) 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 # link target with ALSA
target_link_libraries(${zerospu2Name} ${ALSA_LIBRARIES}) target_link_libraries(${zerospu2Name} ${ALSA_LIBRARIES})
# link target with SoundTouch if(PORTAUDIO_FOUND)
if(localSoundTouch) # link target with PortAudio
target_link_libraries(${zerospu2Name} SoundTouch) #target_link_libraries(${zerospu2Name} ${PORTAUDIO_LIBRARIES})
else(localSoundTouch) endif(PORTAUDIO_FOUND)
target_link_libraries(${zerospu2Name} ${SOUNDTOUCH_LIBRARIES})
endif(localSoundTouch) # 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 # executable name
set(bin2cppName bin2cpp) 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 # variable with all sources of this executable
set(bin2cppSources set(bin2cppSources
bin2cpp.cpp) bin2cpp.cpp)
@ -13,33 +31,6 @@ set(bin2cppHeaders
# add executable # add executable
add_executable(${bin2cppName} ${bin2cppSources} ${bin2cppHeaders}) 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 output directory
set_target_properties(${bin2cppName} PROPERTIES set_target_properties(${bin2cppName} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools/bin) RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools/bin)