diff options
Diffstat (limited to 'tools/CMakeLists.txt')
-rw-r--r-- | tools/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 0000000..d7d10ca --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,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) |