Fixed install target
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Jan 2011 13:36:26 +0000 (13:36 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Jan 2011 13:36:26 +0000 (13:36 +0000)
CMakeLists.txt
cmake/ALICE_CMake.cmake

index 0c144f2..5e05707 100644 (file)
@@ -29,6 +29,7 @@ if(NOT ALICE_INSTALL)
 else()
   message(STATUS "AliRoot files will be installed in ${ALICE_INSTALL}")
 endif(NOT ALICE_INSTALL)
+set(CMAKE_INSTALL_PREFIX ${ALICE_INSTALL})
 
 get_filename_component(PROJECT_SOURCE_DIR "${PROJECT_SOURCE_DIR}" REALPATH)
 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
index 2d63459..996f60e 100644 (file)
@@ -360,9 +360,9 @@ macro(ALICE_BuildModule)
       get_property(EXCLUDEPACKAGE TARGET ${PACKAGE} PROPERTY EXCLUDE_FROM_ALL) 
       if(NOT EXCLUDEPACKAGE)
         install(TARGETS ${PACKAGE} 
-                RUNTIME DESTINATION bin
-                LIBRARY DESTINATION lib
-                ARCHIVE DESTINATION bin)
+                RUNTIME DESTINATION bin/tgt_${ALICE_TARGET}
+                LIBRARY DESTINATION lib/tgt_${ALICE_TARGET}
+                ARCHIVE DESTINATION bin/tgt_${ALICE_TARGET})
       endif(NOT EXCLUDEPACKAGE)
   endforeach(PACKAGEFILE)
 
@@ -519,8 +519,8 @@ macro(ALICE_BuildExecutable)
     add_dependencies(${PACKAGE}-static libAliMDC root-static-libs)
     target_link_libraries(${PACKAGE}-static ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${ROOTLIBDIR}/libRoot.a ${ROOTLIBDIR}/libfreetype.a ${ROOTLIBDIR}/libpcre.a -pthread -ldl -lcurses)
 
-    install(TARGETS ${PACKAGE}-static RUNTIME DESTINATION bin COMPONENT MDC)
-    install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${ROOTLIBDIR}/libRoot.a ${ROOTLIBDIR}/libfreetype.a ${ROOTLIBDIR}/libpcre.a DESTINATION lib COMPONENT MDC)
+    install(TARGETS ${PACKAGE}-static RUNTIME DESTINATION bin/tgt_${ALICE_TARGET} COMPONENT MDC)
+    install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libAliMDC.a ${ROOTLIBDIR}/libRoot.a ${ROOTLIBDIR}/libfreetype.a ${ROOTLIBDIR}/libpcre.a DESTINATION lib/tgt_${ALICE_TARGET} COMPONENT MDC)
     install(FILES ${PROJECT_SOURCE_DIR}/RAW/mdc.h DESTINATION include COMPONENT MDC)
     set(CPACK_RPM_PACKAGE_SUMMARY "AliMDC static libraries")
     set(CPACK_RPM_PACKAGE_NAME "alimdc")