root/branches/newosd/CMakeLists.txt

Revision 6204, 1.6 kB (checked in by eugene, 6 months ago)

Lessen the cmake version restriction.

Line 
1project(newosd)
2cmake_minimum_required(VERSION 2.4.2)
3
4# Plugin version
5set(VERSION_MAJOR 1)
6set(VERSION_MINOR 3)
7set(VERSION_RELEASE 5)
8
9# Install dirs
10set(INSTALL_LIB_DIR lib CACHE PATH
11    "Directory to install the plugin to. A relative path is relative to CMAKE_INSTALL_PREFIX.")
12mark_as_advanced(INSTALL_LIB_DIR)
13
14# Licq headers (see cmake --help-command find_path
15# for the reason why we call find_path twice here)
16find_path(LICQ_INCLUDE_DIR NAMES licq_icqd.h
17          PATHS ${CMAKE_SOURCE_DIR}/../../include
18                ${CMAKE_SOURCE_DIR}/../licq/include
19          NO_DEFAULT_PATHS)
20find_path(LICQ_INCLUDE_DIR NAMES licq_icqd.h)
21
22if (NOT LICQ_INCLUDE_DIR)
23    message(FATAL_ERROR "Licq header files not found. Please specify the location with -DLICQ_INCLUDE_DIR")
24endif (NOT LICQ_INCLUDE_DIR)
25
26message(STATUS "Found Licq include dir: ${LICQ_INCLUDE_DIR}")
27include_directories(${LICQ_INCLUDE_DIR})
28
29# Holds all libraries we should link to
30set(LIBRARIES)
31
32# use pkg-config to find libaosd stuff
33include(FindPkgConfig)
34
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)
38
39pkg_search_module(AOSD REQUIRED libaosd-text)
40
41if (AOSD_FOUND)
42    set(LIBRARIES ${LIBRARIES} ${AOSD_LIBRARIES})
43    include_directories(${AOSD_INCLUDE_DIRS})
44    add_definitions(${AOSD_CFLAGS})
45else (AOSD_FOUND)
46    message(FATAL_ERROR "libaosd-text wasn't found...")
47endif (AOSD_FOUND)
48
49# To find config.h
50include_directories(${CMAKE_BINARY_DIR})
51
52# Generate config.h
53configure_file(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
54
55add_subdirectory(src)
Note: See TracBrowser for help on using the browser.