Changeset 6203

Show
Ignore:
Timestamp:
05/25/08 10:01:31 (6 months ago)
Author:
eugene
Message:

Upgraded the build-system to cmake 2.6.0

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newosd/CMakeLists.txt

    r5986 r6203  
    11project(newosd) 
    2 cmake_minimum_required(VERSION 2.4.2) 
     2cmake_minimum_required(VERSION 2.6.0) 
    33 
    44# Plugin version 
     
    99# Install dirs 
    1010set(INSTALL_LIB_DIR lib CACHE PATH 
    11   "Directory to install the plugin to. A relative path is relative to CMAKE_INSTALL_PREFIX.") 
     11    "Directory to install the plugin to. A relative path is relative to CMAKE_INSTALL_PREFIX.") 
    1212mark_as_advanced(INSTALL_LIB_DIR) 
    1313 
     
    2121 
    2222if (NOT LICQ_INCLUDE_DIR) 
    23   message(FATAL_ERROR "Licq header files not found. Please specify the location with -DLICQ_INCLUDE_DIR") 
     23    message(FATAL_ERROR "Licq header files not found. Please specify the location with -DLICQ_INCLUDE_DIR") 
    2424endif (NOT LICQ_INCLUDE_DIR) 
    2525 
     
    3131 
    3232# use pkg-config to find libaosd stuff 
    33 include(UsePkgConfig) 
     33include(FindPkgConfig) 
    3434 
    35 pkgconfig(libaosd-text AOSD_INCLUDE_DIR AOSD_LINK_DIR AOSD_LINK_FLAGS AOSD_CFLAGS) 
     35if (NOT PKG_CONFIG_FOUND) 
     36    message(FATAL_ERROR "pkg-config could not be found on your system, unable to continue.") 
     37endif (NOT PKG_CONFIG_FOUND) 
    3638 
    37 if (AOSD_LINK_FLAGS) 
    38     message(STATUS "Found aosd-text library dir: ${AOSD_LINK_DIR}") 
    39     set(LIBRARIES ${LIBRARIES} ${AOSD_LINK_FLAGS}) 
    40     include_directories(${AOSD_INCLUDE_DIR}) 
     39pkg_search_module(AOSD REQUIRED libaosd-text) 
     40 
     41if (AOSD_FOUND) 
     42    set(LIBRARIES ${LIBRARIES} ${AOSD_LIBRARIES}) 
     43    include_directories(${AOSD_INCLUDE_DIRS}) 
    4144    add_definitions(${AOSD_CFLAGS}) 
    42 else (AOSD_LINK_FLAGS) 
     45else (AOSD_FOUND) 
    4346    message(FATAL_ERROR "libaosd-text wasn't found...") 
    44 endif (AOSD_LINK_FLAGS) 
     47endif (AOSD_FOUND) 
    4548 
    4649# To find config.h