Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8317


Ignore:
Timestamp:
Apr 24, 2011, 5:46:26 AM (14 years ago)
Author:
rgrieder
Message:

Do not specify the CMAKE_INSTALL_PREFIX when using the INSTALL command. It works too, but is not recommended and breaks CPack.

Location:
code/branches/kicklib2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2/bin/CMakeLists.txt

    r7801 r8317  
    6969# Make a symlink to be able to run from the root directory when installing copyable on Unix
    7070IF(UNIX AND INSTALL_COPYABLE)
    71   INSTAll(CODE "EXECUTE_PROCESS(COMMAND ln -sf ${RUNTIME_INSTALL_DIRECTORY}/${ORXONOX_EXECUTABLE_NAME} ${CMAKE_INSTALL_PREFIX}/orxonox)")
     71  INSTAll(CODE "EXECUTE_PROCESS(COMMAND cmake -E create_symlink \"${CMAKE_INSTALL_PREFIX}/${RUNTIME_INSTALL_DIRECTORY}/${ORXONOX_EXECUTABLE_NAME}\" \"${CMAKE_INSTALL_PREFIX}/${ORXONOX_EXECUTABLE_NAME}\")")
    7272ENDIF()
  • code/branches/kicklib2/cmake/InstallConfig.cmake

    r7163 r8317  
    3939ENDIF()
    4040
    41 # Default installation paths
    42 SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_RUNTIME_PATH})
    43 SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LIBRARY_PATH})
    44 SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${DEFAULT_ARCHIVE_PATH})
    45 SET(MODULE_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_MODULE_PATH})
    46 SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DOC_PATH})
    47 SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/${DEFAULT_DATA_PATH})
    48 SET(CONFIG_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/${DEFAULT_CONFIG_PATH})
    49 SET(LOG_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/${DEFAULT_LOG_PATH})
     41# Default relative installation paths
     42SET(RUNTIME_INSTALL_DIRECTORY ${DEFAULT_RUNTIME_PATH})
     43SET(LIBRARY_INSTALL_DIRECTORY ${DEFAULT_LIBRARY_PATH})
     44SET(ARCHIVE_INSTALL_DIRECTORY ${DEFAULT_ARCHIVE_PATH})
     45SET(MODULE_INSTALL_DIRECTORY  ${DEFAULT_MODULE_PATH})
     46SET(DOC_INSTALL_DIRECTORY     ${DEFAULT_DOC_PATH})
     47SET(DATA_INSTALL_DIRECTORY    ${DEFAULT_DATA_PATH})
     48SET(CONFIG_INSTALL_DIRECTORY  ${DEFAULT_CONFIG_PATH})
     49SET(LOG_INSTALL_DIRECTORY     ${DEFAULT_LOG_PATH})
    5050
    5151IF(NOT INSTALL_COPYABLE)
    52   IF(UNIX) # Apple too?
     52  IF(LINUX)
    5353    # Using absolute paths
    54     SET(RUNTIME_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/games)
    55     SET(LIBRARY_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox)
    56     SET(ARCHIVE_INSTALL_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox/static)
    57     SET(MODULE_INSTALL_DIRECTORY  ${CMAKE_INSTALL_PREFIX}/lib/games/orxonox/modules)
    58     SET(DOC_INSTALL_DIRECTORY     ${CMAKE_INSTALL_PREFIX}/share/doc/orxonox)
    59     SET(DATA_INSTALL_DIRECTORY    ${CMAKE_INSTALL_PREFIX}/share/games/orxonox)
     54    SET(RUNTIME_INSTALL_DIRECTORY games)
     55    SET(LIBRARY_INSTALL_DIRECTORY lib/games/orxonox)
     56    SET(ARCHIVE_INSTALL_DIRECTORY lib/games/orxonox/static)
     57    SET(MODULE_INSTALL_DIRECTORY  lib/games/orxonox/modules)
     58    SET(DOC_INSTALL_DIRECTORY     share/doc/orxonox)
     59    SET(DATA_INSTALL_DIRECTORY    share/games/orxonox)
     60  ELSEIF(WIN32)
     61    # Leave on default (installs to only one location anyway)
     62  ELSEIF(APPLE)
     63    # TODO: Figure out what's the best way to install the application
    6064  ENDIF()
    6165
     
    7579  SET(CMAKE_INSTALL_RPATH ${DEFAULT_LIBRARY_PATH})
    7680ELSE()
    77   SET(CMAKE_INSTALL_RPATH ${LIBRARY_INSTALL_DIRECTORY})
     81  SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIRECTORY})
    7882ENDIF()
    7983
  • code/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8292 r8317  
    289289  # RPATH settings for the installation
    290290  IF(UNIX)
    291     SET(_rpath ${LIBRARY_INSTALL_DIRECTORY})
     291    SET(_rpath ${CMAKE_INSTALL_PREFIX}/${LIBRARY_INSTALL_DIRECTORY})
    292292    IF(_arg_MODULE)
    293       LIST(APPEND _rpath ${MODULE_INSTALL_DIRECTORY})
     293      LIST(APPEND _rpath ${CMAKE_INSTALL_PREFIX}/${MODULE_INSTALL_DIRECTORY})
    294294    ENDIF()
    295295    SET_TARGET_PROPERTIES(${_target_name} PROPERTIES INSTALL_RPATH "${_rpath}")
  • code/branches/kicklib2/src/SpecialConfig.h.in

    r8285 r8317  
    6767#ifndef INSTALL_COPYABLE
    6868    // INSTALLATION PATHS
    69     const char dataInstallDirectory[]       = "@DATA_INSTALL_DIRECTORY@";
    70     const char moduleInstallDirectory[]     = "@MODULE_INSTALL_DIRECTORY@";
     69    const char dataInstallDirectory[]       = "@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIRECTORY@";
     70    const char moduleInstallDirectory[]     = "@CMAKE_INSTALL_PREFIX@/@MODULE_INSTALL_DIRECTORY@";
    7171#endif
    7272
Note: See TracChangeset for help on using the changeset viewer.