diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rwxr-xr-x | Config | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8075b05d7..a6245dd48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,10 +171,8 @@ endif() find_program(CHGRP chgrp) find_program(CHMOD chmod) -# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory -if(INSTDIR) - set(CMAKE_INSTALL_PREFIX "${INSTDIR}") -elseif() +# If CMAKE_INSTALL_PREFIX was not passed in to CMake set the default install prefix to the "anope" directory under the user's home directory +if(NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope") endif() @@ -44,7 +44,7 @@ Run_Build_System () { EXTRA_LIBS="" if [ "$INSTDIR" != "" ] ; then - WITH_INST="-DINSTDIR:STRING=$INSTDIR" + WITH_INST="-DCMAKE_INSTALL_PREFIX:STRING=$INSTDIR" fi if [ "$RUNGROUP" != "" ] ; then |