]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Using CMAKE_INSTALL_PREFIX instead of ALICE_INSTALL if set from configuration
authoragrigora <alina.gabriela.grigoras@cern.ch>
Wed, 12 Mar 2014 14:48:40 +0000 (15:48 +0100)
committerhristov <Peter.Hristov@cern.ch>
Thu, 27 Mar 2014 15:24:52 +0000 (16:24 +0100)
If defined, the installation will use CMAKE_INSTALL_PREFIX, if not it will default to ALICE_INSTALL.
If ALICE_INSTALL is not defined it will default to the source directory ALICE_ROOT

CMakeLists.txt

index d876d162ed17b514d3fd3fdb83494ea4449c0336..f794c8ebe45fa1c9052e2e41321b90370d903a3f 100644 (file)
@@ -36,7 +36,12 @@ endif(NOT ALICE_INSTALL)
 if(${ALICE_INSTALL} STREQUAL ${CMAKE_BINARY_DIR})
   message(FATAL_ERROR "Install dir should be different from build dir")
 endif()
-set(CMAKE_INSTALL_PREFIX ${ALICE_INSTALL})
+
+# If CMAKE_INSTALL_PREFIX was not set than we set it to ALICE_INSTALL. 
+# If ALICE_INSTALL was not defined than it will default to source directory
+if(NOT CMAKE_INSTALL_PREFIX)
+  set(CMAKE_INSTALL_PREFIX ${ALICE_INSTALL})
+endif()
 
 # Environment for SHUTTLE
 set(DIMDIR $ENV{DIMDIR})