Cmake build: Prevent multiple configuration runs

Normally the sequence to compile is
1.) cmake <source> <some parameters>
2.) make

but since 'unset(var CACHE)' changed the cache, the following call to 'make'
triggered the configuration run.
This commit is contained in:
Kornel Benko 2020-04-17 12:13:08 +02:00
parent d9b884341c
commit 5ec95f703c

View File

@ -580,18 +580,22 @@ get_locale_destination(LYX_LOCALEDIR)
set(LYX_ABS_INSTALLED_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/${LYX_LOCALEDIR}")
set(LYX_ABS_TOP_SRCDIR "${TOP_SRC_DIR}")
unset(LYX_MAN_DIR CACHE)
if(LYX_BUNDLE AND APPLE)
set(LYX_MAN_DIR "${LYX_DATA_SUBDIR}" CACHE STRING "Install location for man pages.")
set(LYX_MAN_DIR_tmp "${LYX_DATA_SUBDIR}")
else()
if(WIN32)
set(LYX_MAN_DIR "${CMAKE_BINARY_DIR}/usr/local/man/" CACHE STRING "Install location for man pages.")
set(LYX_MAN_DIR_tmp "${CMAKE_BINARY_DIR}/usr/local/man/")
elseif(UNIX)
set(LYX_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man/" CACHE STRING "Install location for man pages.")
set(LYX_MAN_DIR_tmp "${CMAKE_INSTALL_PREFIX}/share/man/")
else()
set(LYX_MAN_DIR "${CMAKE_INSTALL_PREFIX}/man/" CACHE STRING "Install location for man pages.")
set(LYX_MAN_DIR_tmp "${CMAKE_INSTALL_PREFIX}/man/")
endif()
endif()
if (NOT LYX_MAN_DIR_tmp EQUAL "${LYX_MAN_DIR}")
unset(LYX_MAN_DIR CACHE)
set(LYX_MAN_DIR "${LYX_MAN_DIR_tmp}" CACHE STRING "Install location for man pages.")
endif()
unset(LYX_MAN_DIR_tmp)
mark_as_advanced(LYX_MAN_DIR)
# The Win installer cannot be built by CMake because one needs to install plugins for NSIS