mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake build: Build VERSION_INFO more cmake-like
Use LIST to add entries and convert the list later to a string
This commit is contained in:
parent
9ee1d3e7de
commit
e74174c57a
@ -1085,22 +1085,22 @@ foreach(_option ${LYX_OPTIONS})
|
||||
set(opts "${opts} ${_option}(${${_option}})")
|
||||
endif()
|
||||
endforeach()
|
||||
set(VERSION_INFO "CMake Build")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n Host name: ${CMAKE_HOST_SYSTEM_NAME}")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n Host processor: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n Build flags: ${opts}")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler: ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler flags: ${CMAKE_CXX_FLAGS}")
|
||||
set(tmp_vi "CMake Build")
|
||||
list(APPEND tmp_vi " Host name: ${CMAKE_HOST_SYSTEM_NAME}")
|
||||
list(APPEND tmp_vi " Host processor: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
||||
list(APPEND tmp_vi " Build flags: ${opts}")
|
||||
list(APPEND tmp_vi " C++ Compiler: ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER_VERSION})")
|
||||
list(APPEND tmp_vi " C++ Compiler flags: ${CMAKE_CXX_FLAGS}")
|
||||
if (LYX_DEBUG)
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler user flags: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
list(APPEND tmp_vi " C++ Compiler user flags: ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
else()
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n C++ Compiler user flags: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
list(APPEND tmp_vi " C++ Compiler user flags: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
endif()
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n Qt version: ${QTVERSION}")
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n LyX binary dir: ${CMAKE_INSTALL_PREFIX}/${LYX_UTILITIES_INSTALL_PATH}")
|
||||
list(APPEND tmp_vi " Qt version: ${QTVERSION}")
|
||||
list(APPEND tmp_vi " LyX binary dir: ${CMAKE_INSTALL_PREFIX}/${LYX_UTILITIES_INSTALL_PATH}")
|
||||
get_data_destination(dest_data)
|
||||
set(VERSION_INFO "${VERSION_INFO}\\n LyX files dir: ${CMAKE_INSTALL_PREFIX}/${dest_data}")
|
||||
|
||||
list(APPEND tmp_vi " LyX files dir: ${CMAKE_INSTALL_PREFIX}/${dest_data}")
|
||||
string(REPLACE ";" "\\n" VERSION_INFO "${tmp_vi}")
|
||||
|
||||
configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user