Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2631


Ignore:
Timestamp:
Feb 2, 2009, 1:27:18 PM (15 years ago)
Author:
rgrieder
Message:

Exported package configuration to the dependencies folder.
LibraryConfig.cmake now includes all PackageConfig*.cmake files in the dependency folder, which then configure the library paths.

Location:
code/branches/buildsystem2/cmake
Files:
2 deleted
2 edited

Legend:

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

    r2626 r2631  
    3838  ENDIF()
    3939  IF(${_name}_FIND_VERSION_EXACT)
    40     SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: exactly ${${_name}_FIND_VERSION}")
     40    SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: exactly ${${_name}_FIND_VERSION})")
    4141  ELSE()
    42     SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: at least ${${_name}_FIND_VERSION}")
     42    SET(_fail_msg_adv "${_fail_msg_adv} (version requirements: at least ${${_name}_FIND_VERSION})")
    4343  ENDIF()
    4444  FIND_PACKAGE_HANDLE_STANDARD_ARGS("${_name}" "${_fail_msg_adv}" ${ARGN})
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2630 r2631  
    2929INCLUDE(FindPackageHandleStandardArgs)
    3030
    31 ################ Misc Options ###################
     31############## Platform Scripts #################
    3232
    33 OPTION(LIBRARY_USE_PACKAGE_IF_SUPPORTED
    34        "When set to false CMake will only look in the standard paths for libraries" ON)
    35 
    36 
    37 ############## Platform Scripts #################
     33# On Windows using a package causes way less problems
     34SET(_option_msg "Set this to true to use precompiled dependecy archives")
     35IF(WIN32)
     36  OPTION(USE_DEPENDENCY_PACKAGE "${_option_msg}" ON)
     37ELSE(WIN32)
     38  OPTION(USE_DEPENDENCY_PACKAGE "${_option_msg}" FALSE)
     39ENDIF(WIN32)
    3840
    3941# Scripts for specific library and CMake config
    4042INCLUDE(LibraryConfigTardis)
    4143INCLUDE(LibraryConfigApple)
    42 INCLUDE(LibraryConfigMSVC)
    43 INCLUDE(LibraryConfigMinGW)
     44
     45IF(USE_DEPENDENCY_PACKAGE)
     46  IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/include)
     47    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/dependencies" CACHE PATH "")
     48  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../dependencies/include)
     49    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../dependencies" CACHE PATH "")
     50  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies/include)
     51    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/dependencies" CACHE PATH "")
     52  ELSE()
     53    MESSAGE(STATUS "Warning: Could not find dependency directory."
     54                   "Disable LIBRARY_USE_PACKAGE if you have none intalled.")
     55  ENDIF()
     56  IF(DEPENDENCY_DIR)
     57    FILE(GLOB _package_config_files dependencies/PackageConfig*.cmake)
     58    FOREACH(_file ${_package_config_files})
     59      INCLUDE(${_file})
     60    ENDFOREACH(_file)
     61  ENDIF()
     62ENDIF(USE_DEPENDENCY_PACKAGE)
    4463
    4564# User script
Note: See TracChangeset for help on using the changeset viewer.