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>
This commit is contained in:
parent
cc77602066
commit
ea74574d8f
@ -526,8 +526,19 @@ endif()
|
||||
if(LYX_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
||||
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(LYX_INSTALL_PREFIX ${LYX_INSTALL_PREFIX} CACHE PATH "LyX user's choice install prefix" FORCE)
|
||||
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)
|
||||
set(SYSTEM_DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
@ -561,17 +572,6 @@ else()
|
||||
set(PACKAGE ${PACKAGE_BASE})
|
||||
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)
|
||||
set(CMAKE_INSTALL_PREFIX_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
|
||||
else()
|
||||
|
Loading…
Reference in New Issue
Block a user