mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[11196] Some cmake PREFIX related fixes:
* PREFIX variable doesn't reset CMAKE_INSTALL_PREFIX anymore * List PREFIX in variable list Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
43bdd4910a
commit
fd39a2bdb9
2 changed files with 8 additions and 9 deletions
|
|
@ -119,18 +119,17 @@ endif()
|
|||
# option(TOOLS "Build tools" 0)
|
||||
|
||||
# Set up the install-prefix
|
||||
if(CMAKE_INSTALL_PREFIX STREQUAL "/usr/local")
|
||||
get_filename_component(PREFIX_ABSOLUTE "../mangos-server" ABSOLUTE)
|
||||
set(CMAKE_INSTALL_PREFIX ${PREFIX_ABSOLUTE} CACHE PATH "Install path prefix." FORCE)
|
||||
endif()
|
||||
if(PREFIX)
|
||||
string(REGEX REPLACE "^~" "$ENV{HOME}" PREFIX ${PREFIX})
|
||||
get_filename_component(PREFIX_ABSOLUTE ${PREFIX} ABSOLUTE)
|
||||
set(CMAKE_INSTALL_PREFIX ${PREFIX} CACHE PATH "Install path prefix." FORCE)
|
||||
else()
|
||||
set(PREFIX ${CMAKE_SOURCE_DIR})
|
||||
message(
|
||||
"You probably want to set the PREFIX option. If not set MaNGOS will be installed to ${CMAKE_SOURCE_DIR}."
|
||||
)
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Install path prefix.")
|
||||
endif()
|
||||
set(CMAKE_INSTALL_PREFIX ${PREFIX} CACHE STRING
|
||||
"Install path prefix, prepended onto install directories."
|
||||
FORCE
|
||||
)
|
||||
|
||||
set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
set(CONF_DIR ${CMAKE_INSTALL_PREFIX}/etc)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11195"
|
||||
#define REVISION_NR "11196"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue