carl9170 firmware: update API to 1.8.8.3
[carl9170fw.git] / tools / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2
3 project(tools)
4
5 if (CONFIG_CARL9170FW_MAKE_RELEASE)
6         set(CMAKE_BUILD_TYPE Release)
7 endif (CONFIG_CARL9170FW_MAKE_RELEASE)
8
9 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/extra)
10
11 include(GCCVersion)
12 include("../config.cmake")
13
14 _COMPILER_DUMPVERSION(_COMPILER_VERSION)
15
16 if (("${_COMPILER_VERSION}" VERSION_GREATER 44) OR
17     ("${_COMPILER_VERSION}" VERSION_EQUAL 44))
18
19         include_directories (../include/linux ../include/shared ../include lib include)
20         add_subdirectory(lib)
21         add_subdirectory(src)
22
23         if (CONFIG_CARL9170FW_BUILD_TOOLS_CARLU)
24                 find_package(SDL QUIET)
25                 find_package(USB-1.0 QUIET)
26
27                 if ("${USB-1.0_FOUND}" AND "${SDL_FOUND}")
28                         add_subdirectory(carlu)
29                 else()
30                         if ("${USB-1.0_FOUND}")
31                                 MESSAGE(ERROR "LibUSB not found\n")
32                         endif ("${USB-1.0_FOUND}")
33                         if ("${SDL_FOUND}")
34                                 MESSAGE(ERROR "SDL not found\n")
35                         endif ("${SDL_FOUND}")
36                 endif ()
37         endif (CONFIG_CARL9170FW_BUILD_TOOLS_CARLU)
38 endif ()