mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Build-related fixes (#16102)
- fix mo files rebuilt unnecessarily - fix CMake policy warnings - update vcpkg baseline
This commit is contained in:
parent
d96f5e1c76
commit
0c7149b8df
3 changed files with 8 additions and 8 deletions
|
@ -1,4 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.12)
|
||||
if(POLICY CMP0177)
|
||||
cmake_policy(SET CMP0177 NEW)
|
||||
endif()
|
||||
|
||||
# This can be read from ${PROJECT_NAME} after project() is called
|
||||
project(luanti)
|
||||
|
|
|
@ -1117,20 +1117,17 @@ elseif (USE_GETTEXT)
|
|||
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE})
|
||||
set(MO_FILE_PATH "${MO_BUILD_PATH}/${PROJECT_NAME}.mo")
|
||||
|
||||
add_custom_command(OUTPUT ${MO_BUILD_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
|
||||
COMMENT "mo-update [${LOCALE}]: Creating locale directory.")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${MO_FILE_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
|
||||
COMMAND ${GETTEXT_MSGFMT} -o ${MO_FILE_PATH} ${PO_FILE_PATH}
|
||||
DEPENDS ${MO_BUILD_PATH} ${PO_FILE_PATH}
|
||||
DEPENDS ${PO_FILE_PATH}
|
||||
WORKING_DIRECTORY "${GETTEXT_PO_PATH}/${LOCALE}"
|
||||
COMMENT "mo-update [${LOCALE}]: Creating mo file."
|
||||
COMMENT "mo-update [${LOCALE}]: Creating mo file"
|
||||
)
|
||||
|
||||
list(APPEND MO_FILES ${MO_FILE_PATH})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(translations ALL COMMENT "mo update" DEPENDS ${MO_FILES})
|
||||
add_custom_target(translations ALL COMMENT "mo-update" DEPENDS ${MO_FILES})
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf",
|
||||
"builtin-baseline": "ce613c41372b23b1f51333815feb3edd87ef8a8b",
|
||||
"dependencies": [
|
||||
"zlib",
|
||||
"zstd",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue