mirror of https://github.com/PCSX2/pcsx2.git
cmake: Make Devel the default for the moment. Commit another cmake patch...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2956 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6314d413f9
commit
deb0f620d7
|
@ -9,7 +9,7 @@ cmake_minimum_required(VERSION 2.6)
|
||||||
include(${PROJECT_SOURCE_DIR}/cmake/Pcsx2Utils.cmake)
|
include(${PROJECT_SOURCE_DIR}/cmake/Pcsx2Utils.cmake)
|
||||||
include(${PROJECT_SOURCE_DIR}/cmake/SearchForStuff.cmake)
|
include(${PROJECT_SOURCE_DIR}/cmake/SearchForStuff.cmake)
|
||||||
|
|
||||||
#set(CMAKE_BUILD_TYPE Devel)
|
set(CMAKE_BUILD_TYPE Devel)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# if no build type is set, use Debug as default
|
# if no build type is set, use Debug as default
|
||||||
|
|
|
@ -215,8 +215,13 @@ set(CDVDnull TRUE)
|
||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
# CDVDiso
|
# CDVDiso
|
||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
set(CDVDiso TRUE)
|
# requires: -BZip2
|
||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
|
if(BZIP2_FOUND)
|
||||||
|
set(CDVDiso TRUE)
|
||||||
|
else(BZIP2_FOUND)
|
||||||
|
set(CDVDiso FALSE)
|
||||||
|
endif(BZIP2_FOUND)
|
||||||
|
|
||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
# dev9null
|
# dev9null
|
||||||
|
|
|
@ -3,8 +3,19 @@
|
||||||
# library name
|
# library name
|
||||||
set(UtilitiesName Utilities)
|
set(UtilitiesName Utilities)
|
||||||
|
|
||||||
|
# Clear default flags
|
||||||
|
set(CMAKE_C_FLAGS "")
|
||||||
|
set(CMAKE_CXX_FLAGS "")
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_C_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||||
|
|
||||||
# set common flags
|
# set common flags
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
|
-pthread
|
||||||
-m32
|
-m32
|
||||||
-march=i486
|
-march=i486
|
||||||
-msse
|
-msse
|
||||||
|
@ -71,9 +82,6 @@ set(OptimizationFlags
|
||||||
|
|
||||||
# Debug - Build
|
# Debug - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
|
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
|
||||||
|
@ -81,9 +89,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
|
||||||
# Devel - Build
|
# Devel - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEVEL)
|
|
||||||
set(CMAKE_CXX_FLAGS_DEVEL)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
|
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
|
||||||
|
@ -91,9 +96,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
|
|
||||||
# Release - Build
|
# Release - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
|
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
|
||||||
|
|
|
@ -3,8 +3,19 @@
|
||||||
# library name
|
# library name
|
||||||
set(x86emitterName x86emitter)
|
set(x86emitterName x86emitter)
|
||||||
|
|
||||||
|
# Clear default flags
|
||||||
|
set(CMAKE_C_FLAGS "")
|
||||||
|
set(CMAKE_CXX_FLAGS "")
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_C_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||||
|
|
||||||
# set common flags
|
# set common flags
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
|
-pthread
|
||||||
-fno-guess-branch-probability
|
-fno-guess-branch-probability
|
||||||
-fno-dse
|
-fno-dse
|
||||||
-fno-tree-dse
|
-fno-tree-dse
|
||||||
|
@ -72,9 +83,6 @@ set(OptimizationFlags
|
||||||
|
|
||||||
# Debug - Build
|
# Debug - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG)
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG)
|
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG)
|
||||||
|
@ -82,9 +90,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
|
||||||
# Devel - Build
|
# Devel - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEVEL)
|
|
||||||
set(CMAKE_CXX_FLAGS_DEVEL)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
|
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DPCSX2_DEVEL)
|
||||||
|
@ -92,9 +97,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
|
|
||||||
# Release - Build
|
# Release - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE)
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE)
|
|
||||||
|
|
||||||
# add defines
|
# add defines
|
||||||
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
|
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags})
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
# pcsx2
|
# pcsx2
|
||||||
|
|
||||||
|
# Clear default flags
|
||||||
|
set(CMAKE_C_FLAGS "")
|
||||||
|
set(CMAKE_CXX_FLAGS "")
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "")
|
||||||
|
set(CMAKE_C_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEVEL "")
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "")
|
||||||
|
|
||||||
# set common flags
|
# set common flags
|
||||||
set(CommonFlags
|
set(CommonFlags
|
||||||
|
-pthread
|
||||||
-fno-guess-branch-probability
|
-fno-guess-branch-probability
|
||||||
-fno-dse
|
-fno-dse
|
||||||
-fno-tree-dse
|
-fno-tree-dse
|
||||||
|
@ -68,9 +79,6 @@ set(OptimizationFlags
|
||||||
|
|
||||||
# Debug - Build
|
# Debug - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG " ")
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG " ")
|
|
||||||
|
|
||||||
# executable name
|
# executable name
|
||||||
set(pcsx2Name pcsx2-dbg)
|
set(pcsx2Name pcsx2-dbg)
|
||||||
|
@ -81,9 +89,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||||
|
|
||||||
# Devel - Build
|
# Devel - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_DEVEL " ")
|
|
||||||
set(CMAKE_CXX_FLAGS_DEVEL " ")
|
|
||||||
|
|
||||||
# executable name
|
# executable name
|
||||||
set(pcsx2Name pcsx2-dev)
|
set(pcsx2Name pcsx2-dev)
|
||||||
|
@ -94,9 +99,6 @@ endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||||
|
|
||||||
# Release - Build
|
# Release - Build
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
# clear flags
|
|
||||||
set(CMAKE_C_FLAGS_RELEASE " ")
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE " ")
|
|
||||||
|
|
||||||
# executable name
|
# executable name
|
||||||
set(pcsx2Name pcsx2)
|
set(pcsx2Name pcsx2)
|
||||||
|
@ -105,17 +107,17 @@ if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP -DNDEBUG)
|
add_definitions(${CommonFlags} ${OptimizationFlags} ${LinkerFlags} -DWX_PRECOMP -DNDEBUG)
|
||||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||||
|
|
||||||
# get svn revision and generate svnrev.h
|
# you must have both svn client executable and a source that contains svn metadata
|
||||||
if(SVN)
|
if((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
|
||||||
# execute subversion
|
# execute subversion
|
||||||
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
|
||||||
|
|
||||||
# write svnrev.h
|
# write svnrev.h
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
|
||||||
else(SVN)
|
else((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
|
||||||
# write svnrev.h
|
# write svnrev.h
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
|
||||||
endif(SVN)
|
endif((SVN) AND (EXISTS "${CMAKE_SOURCE_DIR}/.svn"))
|
||||||
|
|
||||||
# variable with sources of this executable
|
# variable with sources of this executable
|
||||||
set(pcsx2Sources
|
set(pcsx2Sources
|
||||||
|
|
Loading…
Reference in New Issue