From 60ce0b32267ac95f2afeb3a0b572d4c4c783ae9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 18 Jan 2009 14:45:57 +0000 Subject: [PATCH] Kornel: Moved handling of for lyx2lyx created files to lyx2lyx/CMakeLists.txt Installation of executabe lyx2lyx creation and installation of lyx2lyx_version.py git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28241 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/CMakeLists.txt | 10 ++-------- development/cmake/Install.cmake | 8 +++----- development/cmake/lyx2lyx/CMakeLists.txt | 10 ++++++++-- development/cmake/scripts/CMakeLists.txt | 7 +++++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index d5224fb959..c533b4e528 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -335,10 +335,6 @@ configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h) find_package(ICONV REQUIRED) add_definitions(-DHAVE_ICONV=1) -#TODO: insource is not the best place -configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in - ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py) - include_directories( ${CMAKE_BINARY_DIR} ${TOP_SRC_DIR}/src @@ -352,10 +348,8 @@ add_subdirectory(src) add_subdirectory(man) add_subdirectory(doc) -if (UNIX) - add_subdirectory(lyx2lyx) - add_subdirectory(scripts) -endif() +add_subdirectory(lyx2lyx) +add_subdirectory(scripts) include(../Install) diff --git a/development/cmake/Install.cmake b/development/cmake/Install.cmake index b1111d2c59..908ecd2565 100755 --- a/development/cmake/Install.cmake +++ b/development/cmake/Install.cmake @@ -18,10 +18,10 @@ macro(lyx_install _parent_src_dir _gl_dir _file_type) foreach(_glob_dir ${ARGN}) file(GLOB _dir_list ${_parent_src_dir}/${_dir}/${_glob_dir}) if(NOT _dir_list) - if(_glob_dir STREQUAL ".") + if(_glob_dir STREQUAL ".") set(_dir_list ${_parent_src_dir}/${_dir}/.) - endif() - endif() + endif() + endif() #message(STATUS "${_dir}/${_glob_dir} -> ${_dir_list} ") foreach(_current_dir ${_dir_list}) file(GLOB _item_list ${_current_dir}/${_file_type}) @@ -78,5 +78,3 @@ lyx_install(${TOP_SRC_DIR}/lib tex * .) lyx_install(${TOP_SRC_DIR}/lib ui * .) lyx_install(${TOP_SRC_DIR}/lib . * .) -install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION lyx2lyx) - diff --git a/development/cmake/lyx2lyx/CMakeLists.txt b/development/cmake/lyx2lyx/CMakeLists.txt index c69631a661..0240cf085b 100644 --- a/development/cmake/lyx2lyx/CMakeLists.txt +++ b/development/cmake/lyx2lyx/CMakeLists.txt @@ -5,7 +5,13 @@ # Copyright (c) 2008, 2009 Kornel Benko, # -set(_project "lyx2lyx") -include(../PyCompile) +configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in + ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lyx2lyx_version.py DESTINATION lyx2lyx) +if (UNIX) + set(_project "lyx2lyx") + include(../PyCompile) +endif() +install(PROGRAMS ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx DESTINATION lyx2lyx) diff --git a/development/cmake/scripts/CMakeLists.txt b/development/cmake/scripts/CMakeLists.txt index 44aa8ac684..5977bc70da 100644 --- a/development/cmake/scripts/CMakeLists.txt +++ b/development/cmake/scripts/CMakeLists.txt @@ -5,5 +5,8 @@ # Copyright (c) 2008, 2009 Kornel Benko, # -set(_project "scripts") -include(../PyCompile) +if (UNIX) + set(_project "scripts") + include(../PyCompile) +endif() + -- 2.39.2