1 set (PROJECT_VER_MAJOR 0)
2 set (PROJECT_VER_MINOR 1)
3 set (PROJECT_VER_PATCH 0)
4 set (PROJECT_VER 0.1.0)
6 if (NOT CMAKE_BUILD_TYPE)
7 set (CMAKE_BUILD_TYPE Debug)
8 endif (NOT CMAKE_BUILD_TYPE)
10 set (_host "${CMAKE_HOST_SYSTEM_NAME}/${CMAKE_HOST_SYSTEM_PROCESSOR}")
11 message ("-- Host: ${_host}")
13 set (_target "${CMAKE_SYSTEM_NAME}/${CMAKE_SYSTEM_PROCESSOR}")
14 message ("-- Target: ${_target}")
16 if (NOT DEFINED MACHINE)
17 set (MACHINE "Generic")
18 endif (NOT DEFINED MACHINE)
19 message ("-- Machine: ${MACHINE}")
21 string (TOLOWER ${CMAKE_SYSTEM_NAME} PROJECT_SYSTEM)
22 string (TOUPPER ${CMAKE_SYSTEM_NAME} PROJECT_SYSTEM_UPPER)
23 string (TOLOWER ${CMAKE_SYSTEM_PROCESSOR} PROJECT_PROCESSOR)
24 string (TOUPPER ${CMAKE_SYSTEM_PROCESSOR} PROJECT_PROCESSOR_UPPER)
25 string (TOLOWER ${MACHINE} PROJECT_MACHINE)
26 string (TOUPPER ${MACHINE} PROJECT_MACHINE_UPPER)
28 # Select to build Remote proc master
29 option (WITH_REMOTEPROC_MASTER "Build as remoteproc master" OFF)
30 if (WITH_REMOTEPROC_MASTER)
31 option (WITH_LINUXREMOTE "The remote is Linux" ON)
32 endif (WITH_REMOTEPROC_MASTER)
34 # Select which components are in the openamp lib
35 option (WITH_PROXY "Build with proxy(access device controlled by other processor)" ON)
36 option (WITH_APPS "Build with sample applicaitons" OFF)
37 option (WITH_PROXY_APPS "Build with proxy sample applicaitons" OFF)
38 if (WITH_APPS)
39 if (WITH_PROXY)
40 set (WITH_PROXY_APPS ON)
41 elseif ("${PROJECT_SYSTEM}" STREQUAL "linux")
42 set (WITH_PROXY_APPS ON)
43 endif (WITH_PROXY)
44 option (WITH_BENCHMARK "Build benchmark app" OFF)
45 endif (WITH_APPS)
46 option (WITH_OBSOLETE "Build obsolete system libs" OFF)
48 # Set the complication flags
49 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
51 if (WITH_LINUXREMOTE)
52 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENAMP_REMOTE_LINUX_ENABLE")
53 endif (WITH_LINUXREMOTE)
55 if (WITH_BENCHMARK)
56 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENAMP_BENCHMARK_ENABLE")
57 endif (WITH_BENCHMARK)
59 option (WITH_STATIC_LIB "Build with a static library" ON)
61 if ("${PROJECT_SYSTEM}" STREQUAL "linux")
62 option (WITH_SHARED_LIB "Build with a shared library" ON)
63 endif ("${PROJECT_SYSTEM}" STREQUAL "linux")
65 option (WITH_LIBMETAL_FIND "Check Libmetal library can be found" ON)
66 option (WITH_EXT_INCLUDES_FIND "Check other external includes are found" ON)
68 message ("-- C_FLAGS : ${CMAKE_C_FLAGS}")
69 # vim: expandtab:ts=2:sw=2:smartindent