mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-20 23:00:29 +00:00
Backport.
Try to avoid use of perl, if there is no perl-command available Copy po-files only if realy changed. Avoids annoying po re-building. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29276 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
18b4b2c0c8
commit
7a2e28c3bf
@ -1,7 +1,7 @@
|
|||||||
# This file is part of LyX, the document processor.
|
# This file is part of LyX, the document processor.
|
||||||
# Licence details can be found in the file COPYING.
|
# Licence details can be found in the file COPYING.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
|
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.4)
|
cmake_minimum_required(VERSION 2.4)
|
||||||
@ -170,7 +170,6 @@ if(NOT MSVC)
|
|||||||
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE)
|
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O2 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O3 -DNDEBUG" CACHE TYPE STRING FORCE)
|
set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O3 -DNDEBUG" CACHE TYPE STRING FORCE)
|
||||||
#set(CMAKE_CXX_FLAGS_RELEASE "${LYX_CXX_FLAGS} -O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
|
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -pg" CACHE TYPE STRING FORCE)
|
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -pg" CACHE TYPE STRING FORCE)
|
||||||
endif()
|
endif()
|
||||||
@ -358,10 +357,13 @@ if(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(nls OR all)
|
FIND_PROGRAM(_PERL_EXECUTABLE perl)
|
||||||
find_package(LyXGettext REQUIRED)
|
if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
|
||||||
include_directories(${TOP_SRC_DIR}/po)
|
if(nls OR all)
|
||||||
add_subdirectory(po)
|
find_package(LyXGettext REQUIRED)
|
||||||
|
include_directories(${TOP_SRC_DIR}/po)
|
||||||
|
add_subdirectory(po)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# compiler tests, config.h generation
|
# compiler tests, config.h generation
|
||||||
@ -389,7 +391,9 @@ endif()
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
add_subdirectory(man)
|
add_subdirectory(man)
|
||||||
add_subdirectory(doc)
|
if(NOT ${_PERL_EXECUTABLE} MATCHES "-NOTFOUND")
|
||||||
|
add_subdirectory(doc)
|
||||||
|
endif()
|
||||||
add_subdirectory(lyx2lyx)
|
add_subdirectory(lyx2lyx)
|
||||||
add_subdirectory(scripts)
|
add_subdirectory(scripts)
|
||||||
|
|
||||||
@ -398,7 +402,6 @@ include(../Install)
|
|||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${LYX_MAJOR_VERSION}")
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
|
SET(CPACK_PACKAGE_VERSION_MINOR "${LYX_MINOR_VERSION}")
|
||||||
FILE(STRINGS "${TOP_SRC_DIR}/development/cmake/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
FILE(STRINGS "${TOP_SRC_DIR}/development/cmake/LyX_summary.txt" CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||||
#SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A WYSIWYM (What You See Is What You Mean) document processor")
|
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${LYX_INSTALL_SUFFIX}")
|
||||||
#
|
#
|
||||||
@ -412,7 +415,7 @@ SET(CPACK_RPM_PACKAGE_VENDOR "The LyX team")
|
|||||||
SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
|
SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}")
|
||||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${project}-${LYX_INSTALL_SUFFIX}")
|
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${project}-${LYX_INSTALL_SUFFIX}")
|
||||||
#
|
#
|
||||||
# for the next ones, cmake insists on data with values in some file
|
# for the next ones, cpack insists on data with values in some file
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt")
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${TOP_SRC_DIR}/development/cmake/LyX_description.txt")
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/development/cmake/LyX_license.txt")
|
SET(CPACK_RESOURCE_FILE_LICENSE "${TOP_SRC_DIR}/development/cmake/LyX_license.txt")
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ FIND_PROGRAM(GETTEXT_MSGUNIQ_EXECUTABLE msguniq)
|
|||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
||||||
COMMAND perl
|
COMMAND ${_PERL_EXECUTABLE}
|
||||||
ARGS -e "\"while(<>){print;}\"" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
ARGS -e "\"while(<>){print;}\"" ${_py_sources} > "${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.cat.pot"
|
||||||
DEPENDS ${_py_sources}
|
DEPENDS ${_py_sources}
|
||||||
)
|
)
|
||||||
@ -90,7 +90,11 @@ ADD_CUSTOM_COMMAND(
|
|||||||
file(GLOB LYX_BASE_PO_FILES RELATIVE ${TOP_SRC_DIR}/po ${TOP_SRC_DIR}/po/*.po)
|
file(GLOB LYX_BASE_PO_FILES RELATIVE ${TOP_SRC_DIR}/po ${TOP_SRC_DIR}/po/*.po)
|
||||||
set(LYX_PO_FILES)
|
set(LYX_PO_FILES)
|
||||||
foreach(_pofile ${LYX_BASE_PO_FILES})
|
foreach(_pofile ${LYX_BASE_PO_FILES})
|
||||||
configure_file(${TOP_SRC_DIR}/po/${_pofile} ${CMAKE_CURRENT_BINARY_DIR}/${_pofile} COPYONLY)
|
add_custom_command(
|
||||||
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${TOP_SRC_DIR}/po/${_pofile} ${CMAKE_CURRENT_BINARY_DIR}/${_pofile}
|
||||||
|
DEPENDS ${TOP_SRC_DIR}/po/${_pofile}
|
||||||
|
)
|
||||||
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
|
list(APPEND LYX_PO_FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pofile})
|
||||||
endforeach(_pofile)
|
endforeach(_pofile)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user