diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index e12d55ba20..764cdc8748 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -1,6 +1,7 @@ ### Select the build type -# Use Release/Devel/Debug : -DCMAKE_BUILD_TYPE=Release|Devel|Debug +# Use Release/Devel/Debug : -DCMAKE_BUILD_TYPE=Release|Devel|Debug # Enable/disable the stripping : -DCMAKE_BUILD_STRIP=TRUE|FALSE +# generation .po based on src : -DCMAKE_BUILD_PO=TRUE|FALSE ### Force the choice of 3rd party library in pcsx2 over system libraries # Use all internal lib: -DFORCE_INTERNAL_ALL=TRUE @@ -29,7 +30,6 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Devel|Release") message(STATUS "BuildType set to ${CMAKE_BUILD_TYPE} by default") endif(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Devel|Release") -# Set default strip option. Can be set with -DCMAKE_BUILD_STRIP=TRUE/FALSE if(NOT DEFINED CMAKE_BUILD_STRIP) if(CMAKE_BUILD_TYPE STREQUAL "Release") set(CMAKE_BUILD_STRIP TRUE) @@ -40,6 +40,16 @@ if(NOT DEFINED CMAKE_BUILD_STRIP) endif(CMAKE_BUILD_TYPE STREQUAL "Release") endif(NOT DEFINED CMAKE_BUILD_STRIP) +if(NOT DEFINED CMAKE_BUILD_PO) + if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(CMAKE_BUILD_PO TRUE) + message(STATUS "Enable the building of po files by default in ${CMAKE_BUILD_TYPE} build !!!") + else(CMAKE_BUILD_TYPE STREQUAL "Release") + set(CMAKE_BUILD_PO FALSE) + message(STATUS "Disable the building of po files by default in ${CMAKE_BUILD_TYPE} build !!!") + endif(CMAKE_BUILD_TYPE STREQUAL "Release") +endif(NOT DEFINED CMAKE_BUILD_PO) + #------------------------------------------------------------------------------- # Select library system vs 3rdparty #------------------------------------------------------------------------------- diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 54da3755bb..0527299649 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -185,6 +185,8 @@ if(wxWidgets_FOUND) if (EXISTS "/usr/lib/wx") STRING(REGEX REPLACE "/usr/lib64/wx" "/usr/lib/wx" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") endif (EXISTS "/usr/lib/wx") + # Multiarch ubuntu/debian + STRING(REGEX REPLACE "/usr/lib/x86_64-linux-gnu" "/usr/lib/i386-linux-gnu" wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") endif(CMAKE_SIZEOF_VOID_P MATCHES "8") endif(Linux) diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index ede40b7843..b4cf72779e 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -66,7 +66,9 @@ endif(Linux AND NOT GTK2_FOUND) #--------------------------------------- # CDVDnull #--------------------------------------- -set(CDVDnull TRUE) +if(GTK2_FOUND) + set(CDVDnull TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- @@ -91,19 +93,25 @@ set(CDVDlinuz TRUE) #--------------------------------------- # dev9null #--------------------------------------- -set(dev9null TRUE) +if(GTK2_FOUND) + set(dev9null TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- # FWnull #--------------------------------------- -set(FWnull TRUE) +if(GTK2_FOUND) + set(FWnull TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- # GSnull #--------------------------------------- -set(GSnull TRUE) +if(GTK2_FOUND) + set(GSnull TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- @@ -161,7 +169,9 @@ endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND AND JPEG_FOUND AND #--------------------------------------- # PadNull #--------------------------------------- -set(PadNull TRUE) +if(GTK2_FOUND) + set(PadNull TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- @@ -195,7 +205,9 @@ endif(SDL_FOUND) #--------------------------------------- # SPU2null #--------------------------------------- -set(SPU2null TRUE) +if(GTK2_FOUND) + set(SPU2null TRUE) +endif(GTK2_FOUND) #--------------------------------------- #--------------------------------------- @@ -234,7 +246,9 @@ endif(SOUNDTOUCH_FOUND AND ALSA_FOUND) #--------------------------------------- # USBnull #--------------------------------------- -set(USBnull TRUE) +if(GTK2_FOUND) + set(USBnull TRUE) +endif(GTK2_FOUND) #--------------------------------------- #------------------------------------------------------------------------------- diff --git a/cmake/Translation.cmake b/cmake/Translation.cmake index 236cccf074..87e0335f2c 100644 --- a/cmake/Translation.cmake +++ b/cmake/Translation.cmake @@ -53,10 +53,16 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS_PCSX2 _potFile _firstPoFileArg) GET_FILENAME_COMPONENT(_lang ${_abs_PATH} NAME_WE) SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}__${_gmoBase}.gmo) - ADD_CUSTOM_COMMAND( OUTPUT ${_gmoFile} - COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile} - COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} - DEPENDS ${_absPotFile} ${_absFile} ) + IF (CMAKE_BUILD_PO) + ADD_CUSTOM_COMMAND( OUTPUT ${_gmoFile} + COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} + DEPENDS ${_absPotFile} ${_absFile} ) + ELSE (CMAKE_BUILD_PO) + ADD_CUSTOM_COMMAND( OUTPUT ${_gmoFile} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} + DEPENDS ${_absPotFile} ${_absFile} ) + ENDIF (CMAKE_BUILD_PO) IF (PACKAGE_MODE) INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo) diff --git a/common/src/Utilities/CMakeLists.txt b/common/src/Utilities/CMakeLists.txt index 4ab69398a5..b5d9040d30 100644 --- a/common/src/Utilities/CMakeLists.txt +++ b/common/src/Utilities/CMakeLists.txt @@ -18,9 +18,6 @@ set(CommonFlags -fno-strict-aliasing -fno-tree-dse -pipe - -Wno-format - -Wno-unused-parameter - -Wno-unused-value -Wunused-variable) # set warning flags diff --git a/common/src/x86emitter/CMakeLists.txt b/common/src/x86emitter/CMakeLists.txt index e20c275293..6b159ad654 100644 --- a/common/src/x86emitter/CMakeLists.txt +++ b/common/src/x86emitter/CMakeLists.txt @@ -18,9 +18,6 @@ set(CommonFlags -fno-tree-dse -fno-strict-aliasing -pipe - -Wno-format - -Wno-unused-parameter - -Wno-unused-value -Wunused-variable) # set warning flags diff --git a/plugins/zzogl-pg/opengl/CMakeLists.txt b/plugins/zzogl-pg/opengl/CMakeLists.txt index 1218f46a52..ba0fb692ff 100644 --- a/plugins/zzogl-pg/opengl/CMakeLists.txt +++ b/plugins/zzogl-pg/opengl/CMakeLists.txt @@ -15,9 +15,6 @@ set(CommonFlags -fno-regmove -fno-strict-aliasing -Wstrict-aliasing # Allow to track strict aliasing issue. - -Wno-format - -Wno-unused-parameter - -Wno-unused-value -Wunused-variable )