mirror of https://github.com/PCSX2/pcsx2.git
cmake: add a PACKAGE_MODE option to reduce the burden of packaging
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4289 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
77f392edac
commit
db948003df
|
@ -9,15 +9,18 @@ set(TOP_CMAKE_WAS_SOURCED TRUE)
|
|||
|
||||
# Print a clear message that 64bits is not supported
|
||||
# It would avoid compilation failure later.
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
message(FATAL_ERROR "
|
||||
PCSX2 does not support 64bits environment. Please install a 32bits chroot or a 32bits OS.
|
||||
PCSX2 have neither no plan to support the 64bits architecture in the future.
|
||||
It will need a complete rewrite of the core emulator and a lots of time
|
||||
|
||||
However when linux distribution will support properly multi-arch package, it will
|
||||
be at least possible to easily compile and install PCSX2 witout too much hassle (the chroot environment)")
|
||||
endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
# Note: disable the failure in package mode
|
||||
if(NOT PACKAGE_MODE)
|
||||
if(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
message(FATAL_ERROR "
|
||||
PCSX2 does not support 64bits environment. Please install a 32bits chroot or a 32bits OS.
|
||||
PCSX2 have neither no plan to support the 64bits architecture in the future.
|
||||
It will need a complete rewrite of the core emulator and a lots of time
|
||||
|
||||
However when linux distribution will support properly multi-arch package, it will
|
||||
be at least possible to easily compile and install PCSX2 witout too much hassle (the chroot environment)")
|
||||
endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
endif(NOT PACKAGE_MODE)
|
||||
|
||||
|
||||
# set module path
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
# control C flags : -DUSER_CMAKE_C_FLAGS="cflags"
|
||||
# control C++ flags : -DUSER_CMAKE_CXX_FLAGS="cxxflags"
|
||||
# control link flags : -DUSER_CMAKE_LD_FLAGS="ldflags"
|
||||
# Special mode to ease package: -DPACKAGE_MODE=TRUE
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -114,6 +115,13 @@ endif(DEFINED USER_CMAKE_CXX_FLAGS)
|
|||
# Use some default machine flags
|
||||
string(STRIP "${CMAKE_CXX_FLAGS} -m32 -msse -msse2 -march=i686 -pthread" CMAKE_CXX_FLAGS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# By default use the standard compilation mode
|
||||
#-------------------------------------------------------------------------------
|
||||
if(NOT DEFINED PACKAGE_MODE)
|
||||
set(PACKAGE_MODE FALSE)
|
||||
endif(NOT DEFINED PACKAGE_MODE)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Select library system vs 3rdparty
|
||||
#-------------------------------------------------------------------------------
|
||||
|
|
|
@ -61,7 +61,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile _firstPoFileArg)
|
|||
IF (L10N_PORTABLE)
|
||||
INSTALL(FILES ${_gmoFile} DESTINATION ${PROJECT_SOURCE_DIR}/bin/Langs/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
ELSE (L10N_PORTABLE)
|
||||
INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
ENDIF (L10N_PORTABLE)
|
||||
|
||||
SET(_gmoFiles ${_gmoFiles} ${_gmoFile})
|
||||
|
|
|
@ -69,34 +69,30 @@ set(OptimizationFlags
|
|||
|
||||
# Debug - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
# executable name
|
||||
set(Output pcsx2-dbg)
|
||||
|
||||
# add defines
|
||||
set(Output pcsx2-dbg)
|
||||
|
||||
add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG -DWX_PRECOMP)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
# Devel - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
|
||||
# executable name
|
||||
set(Output pcsx2-dev)
|
||||
|
||||
# add defines
|
||||
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DWX_PRECOMP -DNDEBUG)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
|
||||
# Release - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
|
||||
# executable name
|
||||
set(Output pcsx2)
|
||||
|
||||
# add defines
|
||||
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -DWX_PRECOMP -DNDEBUG)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
|
||||
# In package mode always use pcsx2
|
||||
if(PACKAGE_MODE)
|
||||
set(Output pcsx2)
|
||||
endif(PACKAGE_MODE)
|
||||
|
||||
# you must have both svn client executable and a source that contains svn metadata
|
||||
if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
|
||||
# execute subversion
|
||||
|
|
Loading…
Reference in New Issue