forked from Ultimaker/Cura
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMakeLists.txt back for translation scripts.
CURA-9483
- Loading branch information
1 parent
ec4c18f
commit 767f6e7
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright (c) 2022 Ultimaker B.V. | ||
# Cura is released under the terms of the LGPLv3 or higher. | ||
|
||
# NOTE: This is only being used for translation scripts. | ||
|
||
# For MSVC flags, will be ignored on non-Windows OS's and this project in general. Only needed for cura-build-environment. | ||
cmake_policy(SET CMP0091 NEW) | ||
project(cura) | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
include(GNUInstallDirs) | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | ||
|
||
set(URANIUM_DIR "${CMAKE_SOURCE_DIR}/../Uranium" CACHE PATH "The location of the Uranium repository") | ||
set(URANIUM_SCRIPTS_DIR "${URANIUM_DIR}/scripts" CACHE PATH "The location of the scripts directory of the Uranium repository") | ||
|
||
option(GENERATE_TRANSLATIONS "Should the translations be generated?" ON) | ||
|
||
if(NOT ${URANIUM_DIR} STREQUAL "") | ||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${URANIUM_DIR}/cmake") | ||
endif() | ||
if(NOT ${URANIUM_SCRIPTS_DIR} STREQUAL "") | ||
list(APPEND CMAKE_MODULE_PATH ${URANIUM_DIR}/cmake) | ||
include(UraniumTranslationTools) | ||
# Extract Strings | ||
add_custom_target(extract-messages ${URANIUM_SCRIPTS_DIR}/extract-messages ${CMAKE_SOURCE_DIR} cura) | ||
# Build Translations | ||
if(${GENERATE_TRANSLATIONS}) | ||
CREATE_TRANSLATION_TARGETS() | ||
endif() | ||
endif() |