mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Cmake build: Initialize variable 'CMAKE_INSTALL_PREFIX' before use
Spotted by Eugene Chornyi <yu_jin@lyx.org>
(cherry picked from commit ea74574d8f
)
This commit is contained in:
parent
ae1ddcbda0
commit
f01141a77d
@ -526,8 +526,19 @@ endif()
|
|||||||
if(LYX_INSTALL_PREFIX)
|
if(LYX_INSTALL_PREFIX)
|
||||||
set(CMAKE_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
set(CMAKE_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
||||||
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
set(LYX_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
||||||
endif()
|
endif()
|
||||||
set(LYX_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
# see http://www.cmake.org/pipermail/cmake/2006-October/011559.html
|
||||||
|
if (UNIX)
|
||||||
|
# use the default "/usr/local"
|
||||||
|
# but respect the user-choice on the command-line
|
||||||
|
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "LyX default install prefix" FORCE)
|
||||||
|
endif()
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_INSTALL_PREFIX LYX_INSTALLED CACHE PATH "LyX default install prefix" FORCE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||||
@ -561,17 +572,6 @@ else()
|
|||||||
set(PACKAGE ${PACKAGE_BASE})
|
set(PACKAGE ${PACKAGE_BASE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
||||||
# see http://www.cmake.org/pipermail/cmake/2006-October/011559.html
|
|
||||||
if (UNIX)
|
|
||||||
# use the default "/usr/local"
|
|
||||||
# but respect the user-choice on the command-line
|
|
||||||
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "LyX default install prefix" FORCE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if(WIN32)
|
|
||||||
set(CMAKE_INSTALL_PREFIX LYX_INSTALLED CACHE PATH "LyX default install prefix" FORCE)
|
|
||||||
endif()
|
|
||||||
if(IS_ABSOLUTE)
|
if(IS_ABSOLUTE)
|
||||||
set(CMAKE_INSTALL_PREFIX_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
|
set(CMAKE_INSTALL_PREFIX_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
|
||||||
else()
|
else()
|
||||||
|
Loading…
Reference in New Issue
Block a user