summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 01e192224c2d08aeade241aa4212fb9a698dc839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
project(razer C)

cmake_minimum_required(VERSION 2.4)

if (COMMAND cmake_policy)
	# Libraries linked via full path no longer produce linker search paths.
	cmake_policy(SET CMP0003 NEW)
	# Preprocessor definition values are not escaped automatically.
	cmake_policy(SET CMP0005 OLD)
endif (COMMAND cmake_policy)

include(CheckIncludeFile)

macro(CHECK_LIB _LIB _HEADER)
	check_include_file(${_HEADER} ${_HEADER}_ERR)
	if (NOT ${_HEADER}_ERR)
		message(FATAL_ERROR "Could not find library \"lib${_LIB}\". "
			"On Debian Linux try \"apt-get install lib${_LIB}-dev\" "
			"to install the library.")
	endif (NOT ${_HEADER}_ERR)
endmacro(CHECK_LIB)

check_lib(usb usb.h)

set(CMAKE_C_FLAGS_DEBUG "-DDEBUG ${CMAKE_C_FLAGS_DEBUG}")

add_subdirectory(librazer)
add_subdirectory(razerd)
add_subdirectory(ui)
bues.ch cgit interface