Make translations detection more robust
Thanks to Scott Giese for the suggestion, check for a full valid path inside the Translation setup, in case FGData exists but is not populated.
This commit is contained in:
parent
eb70f5edd4
commit
ca8b84dae0
1 changed files with 3 additions and 2 deletions
|
@ -1,11 +1,12 @@
|
|||
|
||||
GET_FILENAME_COMPONENT(SRC_PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
|
||||
SET(FGDATA_SRC_DIR "${SRC_PARENT_DIR}/fgdata")
|
||||
set(xlf_file "en_US/FlightGear-Qt.xlf")
|
||||
|
||||
if(EXISTS ${TRANSLATIONS_SRC_DIR})
|
||||
if(EXISTS "${TRANSLATIONS_SRC_DIR}/${xlf_file}")
|
||||
message(STATUS "Using explicitly defined translations from: ${TRANSLATIONS_SRC_DIR}")
|
||||
set(do_translate TRUE)
|
||||
elseif(EXISTS ${FGDATA_SRC_DIR})
|
||||
elseif(EXISTS "${FGDATA_SRC_DIR}/Translations/${xlf_file}")
|
||||
SET(TRANSLATIONS_SRC_DIR "${FGDATA_SRC_DIR}/Translations")
|
||||
message(STATUS "Found translations dir implicitly: ${TRANSLATIONS_SRC_DIR}")
|
||||
set(do_translate TRUE)
|
||||
|
|
Loading…
Add table
Reference in a new issue