amiro-blt / Host / Source / SerialBoot / CMakeLists.txt @ 6feb42c8
History | View | Annotate | Download (2.87 KB)
| 1 |
#**************************************************************************************** |
|---|---|
| 2 |
# \file CMakeLists.txt |
| 3 |
# \brief CMake descriptor file for SerialBoot command line demonstration program. |
| 4 |
# \ingroup SerialBoot |
| 5 |
# \internal |
| 6 |
#---------------------------------------------------------------------------------------- |
| 7 |
# C O P Y R I G H T |
| 8 |
#---------------------------------------------------------------------------------------- |
| 9 |
# Copyright (c) 2014 by Feaser http://www.feaser.com All rights reserved |
| 10 |
# |
| 11 |
#---------------------------------------------------------------------------------------- |
| 12 |
# L I C E N S E |
| 13 |
#---------------------------------------------------------------------------------------- |
| 14 |
# This file is part of OpenBLT. OpenBLT is free software: you can redistribute it and/or |
| 15 |
# modify it under the terms of the GNU General Public License as published by the Free |
| 16 |
# Software Foundation, either version 3 of the License, or (at your option) any later |
| 17 |
# version. |
| 18 |
# |
| 19 |
# OpenBLT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 20 |
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 21 |
# PURPOSE. See the GNU General Public License for more details. |
| 22 |
# |
| 23 |
# You should have received a copy of the GNU General Public License along with OpenBLT. |
| 24 |
# If not, see <http://www.gnu.org/licenses/>. |
| 25 |
# |
| 26 |
# A special exception to the GPL is included to allow you to distribute a combined work |
| 27 |
# that includes OpenBLT without being obliged to provide the source code for any |
| 28 |
# proprietary components. The exception text is included at the bottom of the license |
| 29 |
# file <license.html>. |
| 30 |
# |
| 31 |
# \endinternal |
| 32 |
#**************************************************************************************** |
| 33 |
|
| 34 |
# Specify the version being used aswell as the language |
| 35 |
cmake_minimum_required(VERSION 2.8) |
| 36 |
|
| 37 |
# Specify the project name |
| 38 |
project(SerialBoot) |
| 39 |
|
| 40 |
# Set the port directory, which is platform specific |
| 41 |
IF(WIN32) |
| 42 |
set(PROJECT_PORT_DIR ${PROJECT_SOURCE_DIR}/port/win32)
|
| 43 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPLATFORM_WIN32 -D_CRT_SECURE_NO_WARNINGS")
|
| 44 |
ELSEIF(UNIX) |
| 45 |
set(PROJECT_PORT_DIR ${PROJECT_SOURCE_DIR}/port/linux)
|
| 46 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPLATFORM_LINUX")
|
| 47 |
ENDIF(WIN32) |
| 48 |
|
| 49 |
# Build debug version by default |
| 50 |
set(CMAKE_BUILD_TYPE "Debug") |
| 51 |
|
| 52 |
# Set include directories |
| 53 |
include_directories("${PROJECT_SOURCE_DIR}" "${PROJECT_PORT_DIR}" "${PROJECT_SOURCE_DIR}/port")
|
| 54 |
|
| 55 |
# Get header files |
| 56 |
file(GLOB_RECURSE INCS "*.h") |
| 57 |
|
| 58 |
# Add sources |
| 59 |
add_executable( |
| 60 |
SerialBoot |
| 61 |
main.c |
| 62 |
xcpmaster.c |
| 63 |
srecord.c |
| 64 |
${PROJECT_PORT_DIR}/xcptransport.c
|
| 65 |
${PROJECT_PORT_DIR}/timeutil.c
|
| 66 |
${INCS}
|
| 67 |
) |
| 68 |
|
| 69 |
# Load bluetooth library |
| 70 |
#target_link_libraries(SerialBoot "bluetooth") |
| 71 |
|
| 72 |
|
| 73 |
#*********************************** end of CMakeLists.txt ****************************** |