Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2651


Ignore:
Timestamp:
Feb 12, 2009, 7:45:50 PM (15 years ago)
Author:
rgrieder
Message:
  • Not installing static libraries (also accounts for import libraries on windows)
  • Using find_path to determine dependency directory if requested
  • Removed install bin folder from CMAKE_SYSTEM_LIBRARY_PATH as well
Location:
code/branches/buildsystem2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/InstallUtilities.cmake

    r2634 r2651  
    3030    RUNTIME DESTINATION bin
    3131    LIBRARY DESTINATION lib
    32     ARCHIVE DESTINATION lib
     32    #ARCHIVE DESTINATION lib
    3333  )
    3434ENDFUNCTION(ORXONOX_INSTALL)
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2649 r2651  
    3232# There might already be an installation from another compiler
    3333LIST(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")
     34LIST(REMOVE_ITEM CMAKE_SYSTEM_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/bin")
    3435
    3536############## Platform Scripts #################
     
    4849
    4950IF(USE_DEPENDENCY_PACKAGE)
    50   IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/include)
    51     SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/dependencies" CACHE PATH "")
    52   ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../dependencies/include)
    53     SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../dependencies" CACHE PATH "")
    54   ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies/include)
    55     SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/dependencies" CACHE PATH "")
    56   ELSE()
     51  FIND_PATH(DEPENDENCY_DIR
     52    NAMES PackageConfigMSVC.cmake PackageConfigMinGW.cmake
     53    PATHS
     54      ${CMAKE_SOURCE_DIR}/dependencies
     55      ${CMAKE_SOURCE_DIR}/../dependencies
     56      ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies
     57  )
     58  IF(NOT DEPENDENCY_DIR)
    5759    MESSAGE(STATUS "Warning: Could not find dependency directory."
    5860                   "Disable LIBRARY_USE_PACKAGE if you have none intalled.")
    59   ENDIF()
    60   IF(DEPENDENCY_DIR)
    61     FILE(GLOB _package_config_files dependencies/PackageConfig*.cmake)
     61  ELSE()
     62    FILE(GLOB _package_config_files "${DEPENDENCY_DIR}/PackageConfig*.cmake")
    6263    FOREACH(_file ${_package_config_files})
    6364      INCLUDE(${_file})
    6465    ENDFOREACH(_file)
    65   ENDIF()
    6666
    67   # On Windows, DLLs have to be in the executable folder
    68   IF(WIN32)
    69     # When installing a debug version, we really can't know which libraries
    70     # are used in released mode because there might be deps of deps.
    71     INSTALL(DIRECTORY ${DEP_BINARY_DIR}/ DESTINATION bin CONFIGURATIONS Debug)
     67    # On Windows, DLLs have to be in the executable folder
     68    IF(DEP_BINARY_DIR AND WIN32)
     69      # When installing a debug version, we really can't know which libraries
     70      # are used in released mode because there might be deps of deps.
     71      INSTALL(DIRECTORY ${DEP_BINARY_DIR}/ DESTINATION bin CONFIGURATIONS Debug)
    7272
    73     # Try to filter out all the debug libraries. If the regex doesn't do the
    74     # job anymore, simply adjust it.
    75     FILE(GLOB _dependencies_all "${DEP_BINARY_DIR}/*")
    76     FOREACH(_dep ${_dependencies_all})
    77       IF(NOT _dep MATCHES "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$")
    78         LIST(APPEND _dependencies_release "${_dep}")
    79       ENDIF()
    80     ENDFOREACH(_dep)
    81     INSTALL(FILES ${_dependencies_release} DESTINATION bin
    82             CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
    83   ENDIF(WIN32)
     73      # Try to filter out all the debug libraries. If the regex doesn't do the
     74      # job anymore, simply adjust it.
     75      FILE(GLOB _dependencies_all "${DEP_BINARY_DIR}/*")
     76      FOREACH(_dep ${_dependencies_all})
     77        IF(NOT _dep MATCHES "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$")
     78          LIST(APPEND _dependencies_release "${_dep}")
     79        ENDIF()
     80      ENDFOREACH(_dep)
     81      INSTALL(FILES ${_dependencies_release} DESTINATION bin
     82              CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
     83    ENDIF(DEP_BINARY_DIR AND WIN32)
     84  ENDIF(NOT DEPENDENCY_DIR)
    8485ENDIF(USE_DEPENDENCY_PACKAGE)
    8586
  • code/branches/buildsystem2/src/cpptcl/CMakeLists.txt

    r2634 r2651  
    3737ELSE()
    3838  ADD_LIBRARY(cpptcl_orxonox SHARED ${CPPTCL_FILES})
     39  ORXONOX_INSTALL(cpptcl_orxonox)
    3940ENDIF()
    4041
     
    4243  ${TCL_LIBRARY}
    4344)
    44 
    45 ORXONOX_INSTALL(cpptcl_orxonox)
  • code/branches/buildsystem2/src/tinyxml/CMakeLists.txt

    r2634 r2651  
    3636ELSE()
    3737  ADD_LIBRARY(tinyxml++_orxonox SHARED ${TINYXML++_FILES})
     38  ORXONOX_INSTALL(tinyxml++_orxonox)
    3839ENDIF()
    39 
    40 ORXONOX_INSTALL(tinyxml++_orxonox)
Note: See TracChangeset for help on using the changeset viewer.