File: CMakeLists.txt

package info (click to toggle)
bladerf 0.2016.06-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 13,620 kB
  • sloc: ansic: 44,880; vhdl: 11,945; python: 1,062; xml: 1,028; tcl: 952; makefile: 654; sh: 537; csh: 18; cpp: 9
file content (51 lines) | stat: -rw-r--r-- 1,631 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 2.8)

#####################################################################
# Choose which major components to build
#####################################################################
option(ENABLE_HOST_BUILD
       "Build the bladeRF host components"
       ON
)

option(ENABLE_FX3_BUILD
       "Build the Cypress FX3 firmware component. Be sure to define FX3_SDK_PATH"
       OFF
)

#####################################################################
# Flag for development version vs tagged release
#####################################################################
option(TAGGED_RELEASE
       "Indicates that this is a tagged release.  Drops '-git' flag."
       OFF
)

if(TAGGED_RELEASE)
    set(VERSION_INFO_EXTRA "")
else()
    set(VERSION_INFO_EXTRA "git")
endif()

#####################################################################
# Build components
#####################################################################
if(ENABLE_HOST_BUILD)
    add_subdirectory(host)
else()
    message(STATUS "Skipping host component build")
endif()

if(ENABLE_FX3_BUILD)
    include(ExternalProject)
    ExternalProject_Add(fx3_firmware
        DOWNLOAD_COMMAND ""
        SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fx3_firmware"
        CMAKE_ARGS "-DFX3_SDK_PATH=${FX3_SDK_PATH};-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/fx3_firmware/cmake/fx3-toolchain.cmake"
        BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/fx3_firmware"
        PREFIX     "${CMAKE_CURRENT_BINARY_DIR}/fx3_firmware"
        INSTALL_COMMAND ""
    )
else()
    message(STATUS "Skipping FX3 firmware build")
endif()