NerfUS_cmake_add_library_from_mbed

Dependencies:   mbed-rtos mbed HardwareInterface

Fork of NerfUS_cmake_cleanup by Maxime Dupuis

HardwareInterface.cmake

Committer:
Maxime Dupuis
Date:
2017-02-16
Revision:
12:850be84c78dd

File content as of revision 12:850be84c78dd:

cmake_minimum_required(VERSION 3.5)

# Download and unpack hardwareInterface at configure time
configure_file(HardwareInterface.txt.in
               hardwareInterface-download/CMakeLists.txt)

execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/hardwareInterface-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build .
  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/hardwareInterface-download )
 
# Add hardwareInterface directly to our build.
add_subdirectory(${CMAKE_BINARY_DIR}/hardwareInterface-src
                 ${CMAKE_BINARY_DIR}/hardwareInterface-build)
 
include_directories("${hardwareInterface_SOURCE_DIR}/include")