summaryrefslogtreecommitdiff
path: root/tools/CMakeLists.txt
blob: d7d10cad9595f7fd45f66a3d5027df1a9d3b18f6 (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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(bcmtool C)

IF (TIZEN_WEARABLE)
SET(SRCS_4330B1 bcmtool_4330b1_w.c)
ELSE ()
SET(SRCS_4330B1 bcmtool_4330b1_m.c)
ENDIF (TIZEN_WEARABLE)

SET(BCMTOOL_4330B1 ${PROJECT_NAME}_4330b1)

SET(PREFIX ${CMAKE_INSTALL_PREFIX})

FIND_PROGRAM(UNAME NAMES uname)
EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" STREQUAL "arm")
	ADD_DEFINITIONS("-DTARGET")
	MESSAGE("add -DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")

ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")

ADD_EXECUTABLE(${BCMTOOL_4330B1} ${SRCS_4330B1})

TARGET_LINK_LIBRARIES(${BCMTOOL_4330B1} ${package_LDFLAGS})

# install binary file
INSTALL(TARGETS ${BCMTOOL_4330B1} DESTINATION ${PLUGIN_INSTALL_PREFIX}/bin)