diff --git a/CMakeLists.txt b/CMakeLists.txt index 05cbf37c79..3dbb3062a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 77453983f8..b2baddc6bf 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -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 #------------------------------------------------------------------------------- diff --git a/cmake/Translation.cmake b/cmake/Translation.cmake index cad8d34098..7078fccf8d 100644 --- a/cmake/Translation.cmake +++ b/cmake/Translation.cmake @@ -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}) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 802ea47a04..98017fe74a 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -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