Add cmake TRANSLATIONS_ONLY for translations.zip.
Builds translations.zip and nothing else. This is for the nightly builder when only translations are changed. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
ea9d95dfa0
commit
a5b2d070dc
|
@ -798,7 +798,9 @@ if(X86_64)
|
||||||
add_definitions(-D__AMD64__ -D__X86_64__)
|
add_definitions(-D__AMD64__ -D__X86_64__)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT TRANSLATIONS_ONLY)
|
||||||
add_subdirectory(fex)
|
add_subdirectory(fex)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(
|
set(
|
||||||
SRC_MAIN
|
SRC_MAIN
|
||||||
|
@ -1074,6 +1076,7 @@ if(ENABLE_FFMPEG)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT TRANSLATIONS_ONLY)
|
||||||
add_library(
|
add_library(
|
||||||
vbamcore
|
vbamcore
|
||||||
STATIC
|
STATIC
|
||||||
|
@ -1095,8 +1098,9 @@ add_library(
|
||||||
add_dependencies(vbamcore generate)
|
add_dependencies(vbamcore generate)
|
||||||
set_property(TARGET vbamcore PROPERTY CXX_STANDARD 11)
|
set_property(TARGET vbamcore PROPERTY CXX_STANDARD 11)
|
||||||
set_property(TARGET vbamcore PROPERTY CXX_STANDARD_REQUIRED ON)
|
set_property(TARGET vbamcore PROPERTY CXX_STANDARD_REQUIRED ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_SDL)
|
if((NOT TRANSLATIONS_ONLY) AND ENABLE_SDL)
|
||||||
add_executable(
|
add_executable(
|
||||||
vbam
|
vbam
|
||||||
WIN32
|
WIN32
|
||||||
|
|
|
@ -203,6 +203,7 @@ Here is the complete list:
|
||||||
| SSP_STATIC | Try to link static gcc stack protector library (gcc only) | OFF except Win32 |
|
| SSP_STATIC | Try to link static gcc stack protector library (gcc only) | OFF except Win32 |
|
||||||
| OPENAL_STATIC | Try to link static OpenAL libraries | OFF |
|
| OPENAL_STATIC | Try to link static OpenAL libraries | OFF |
|
||||||
| SSP_STATIC | Link gcc stack protecter libssp statically (gcc, with ENABLE_SSP) | OFF |
|
| SSP_STATIC | Link gcc stack protecter libssp statically (gcc, with ENABLE_SSP) | OFF |
|
||||||
|
| TRANSLATIONS_ONLY | Build only the translations.zip and nothing else | OFF |
|
||||||
|
|
||||||
Note for distro packagers, we use the CMake module
|
Note for distro packagers, we use the CMake module
|
||||||
[GNUInstallDirs](https://cmake.org/cmake/help/v2.8.12/cmake.html#module:GNUInstallDirs)
|
[GNUInstallDirs](https://cmake.org/cmake/help/v2.8.12/cmake.html#module:GNUInstallDirs)
|
||||||
|
|
|
@ -5,4 +5,4 @@ gettext_create_translations(
|
||||||
${po_files}
|
${po_files}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(visualboyadvance-m translations)
|
add_dependencies(translations-zip translations)
|
||||||
|
|
|
@ -281,7 +281,8 @@ else()
|
||||||
|
|
||||||
if((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
if((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
AND NOT CMAKE_CROSSCOMPILING
|
AND NOT CMAKE_CROSSCOMPILING
|
||||||
AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
AND NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD
|
||||||
|
AND NOT TRANSLATIONS_ONLY)
|
||||||
|
|
||||||
set(ABI_CHECK TRUE)
|
set(ABI_CHECK TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
@ -865,6 +866,7 @@ if(APPLE)
|
||||||
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
|
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT TRANSLATIONS_ONLY)
|
||||||
add_executable(
|
add_executable(
|
||||||
visualboyadvance-m
|
visualboyadvance-m
|
||||||
WIN32
|
WIN32
|
||||||
|
@ -1011,21 +1013,20 @@ if(NOT WIN32 AND NOT APPLE)
|
||||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/visualboyadvance-m.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata)
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/visualboyadvance-m.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata)
|
||||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons/sizes/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons/sizes/ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(TRANSLATIONS_ONLY "Build only the translations.zip" OFF)
|
||||||
|
|
||||||
# Make the translations.zip for windows builds.
|
# Make the translations.zip for windows builds.
|
||||||
if(ENABLE_NLS AND WIN32)
|
if(ENABLE_NLS)
|
||||||
file(GLOB catalogs ${CMAKE_BINARY_DIR}/po/wxvbam/*.gmo)
|
file(GLOB catalogs ${CMAKE_BINARY_DIR}/po/wxvbam/*.gmo)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_target(
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/translations.zip
|
translations-zip ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -D "ZIP_PROGRAM=${ZIP_PROGRAM}" -P ${CMAKE_CURRENT_SOURCE_DIR}/make-translations-zip.cmake
|
COMMAND ${CMAKE_COMMAND} -D "ZIP_PROGRAM=${ZIP_PROGRAM}" -P ${CMAKE_CURRENT_SOURCE_DIR}/make-translations-zip.cmake
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||||
DEPENDS translations make-translations-zip.cmake ${catalogs}
|
DEPENDS translations make-translations-zip.cmake ${catalogs}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(translations-zip DEPENDS ${CMAKE_BINARY_DIR}/translations.zip)
|
|
||||||
|
|
||||||
add_dependencies(visualboyadvance-m translations-zip)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Update the gettext pot source.
|
# Update the gettext pot source.
|
||||||
|
@ -1051,15 +1052,16 @@ if(ENABLE_NLS)
|
||||||
|
|
||||||
add_dependencies(gettext-pot xrc-strings)
|
add_dependencies(gettext-pot xrc-strings)
|
||||||
|
|
||||||
add_dependencies(visualboyadvance-m gettext-pot)
|
add_dependencies(translations-zip gettext-pot)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET visualboyadvance-m
|
TARGET translations-zip
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -D SRC_DIR=${CMAKE_SOURCE_DIR}/po/wxvbam -D BIN_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/check-pot-updated.cmake
|
COMMAND ${CMAKE_COMMAND} -D SRC_DIR=${CMAKE_SOURCE_DIR}/po/wxvbam -D BIN_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/check-pot-updated.cmake
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT TRANSLATIONS_ONLY)
|
||||||
find_program(GPG_PROGRAM gpg)
|
find_program(GPG_PROGRAM gpg)
|
||||||
|
|
||||||
if(GPG_PROGRAM)
|
if(GPG_PROGRAM)
|
||||||
|
@ -1277,5 +1279,6 @@ install(
|
||||||
if(BUILD_TESTING AND (NOT CMAKE_CROSSCOMPILING))
|
if(BUILD_TESTING AND (NOT CMAKE_CROSSCOMPILING))
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# vim:sw=4 et tw=0:
|
# vim:sw=4 et tw=0:
|
||||||
|
|
Loading…
Reference in New Issue