host: Minor rearrangement of the host-common directory
This commit is contained in:
parent
0a5f853d47
commit
4f0808a635
7 changed files with 22 additions and 13 deletions
|
|
@ -27,12 +27,20 @@ set(BLADERF_FW_COMMON_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../firmware_common)
|
|||
|
||||
# Source and headers common amongst host software
|
||||
set(BLADERF_HOST_COMMON_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_LIST_DIR}/common
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common
|
||||
${CMAKE_CURRENT_LIST_DIR}/common/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common/include
|
||||
)
|
||||
|
||||
set(BLADERF_HOST_COMMON_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/common)
|
||||
set(BLADERF_HOST_COMMON_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/common/src)
|
||||
|
||||
################################################################################
|
||||
# Configure host-specific items
|
||||
################################################################################
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common/include/host_config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common/include/host_config.h
|
||||
@ONLY
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Compiler configuration
|
||||
|
|
@ -93,11 +101,15 @@ else()
|
|||
message(FATAL_ERROR "Unsupported host operating system: ${CMAKE_SYSTEM_NAME}")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common/include/host_config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common/include/host_config.h
|
||||
@ONLY
|
||||
)
|
||||
|
||||
################################################################################
|
||||
# Process subdirectories
|
||||
################################################################################
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(libraries)
|
||||
add_subdirectory(misc)
|
||||
add_subdirectory(utilities)
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
project(bladerf_host_common C)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/host_config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/host_config.h
|
||||
@ONLY
|
||||
)
|
||||
|
|
@ -86,6 +86,9 @@
|
|||
* portability!
|
||||
*
|
||||
* http://stackoverflow.com/questions/5440611/how-to-rewrite-c-struct-designated-initializers-to-c89-resp-msvc-c-compiler
|
||||
*
|
||||
* Here's a sample regexep you could use in vim to clean these up in your code:
|
||||
* @\(\s\+\)\(\.[a-zA-Z0-9_]\+\)\s*=\s*\([a-zA-Z0-9_]\+\)\(,\)\?@\1FIELD_INIT(\2,\3)\4@gc
|
||||
*/
|
||||
#if BLADERF_OS_WINDOWS
|
||||
# define FIELD_INIT(field, ...) field = __VA_ARGS__
|
||||
|
|
@ -130,6 +130,8 @@ set(LIBBLADERF_SOURCE
|
|||
${BLADERF_HOST_COMMON_SOURCE_DIR}/conversions.c
|
||||
)
|
||||
|
||||
message(STATUS "In libraries ${BLADERF_HOST_COMMON_SOURCE_DIR}")
|
||||
|
||||
if(ENABLE_BACKEND_LIBUSB)
|
||||
set(LIBBLADERF_SOURCE ${LIBBLADERF_SOURCE} src/backend/libusb.c)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue