mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			CMake: Add support for platform dir
							parent
							
								
									8f9bf40323
								
							
						
					
					
						commit
						929adbe936
					
				| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
 | 
			
		||||
# SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 | 
			
		||||
add_subdirectory(cxxsupport)
 | 
			
		||||
add_subdirectory(source)
 | 
			
		||||
 | 
			
		||||
target_include_directories(mbed-os
 | 
			
		||||
    PUBLIC
 | 
			
		||||
        ${CMAKE_CURRENT_SOURCE_DIR}
 | 
			
		||||
        ${CMAKE_CURRENT_SOURCE_DIR}/internal
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
 | 
			
		||||
# SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 | 
			
		||||
target_include_directories(mbed-os
 | 
			
		||||
    PUBLIC
 | 
			
		||||
        ${CMAKE_CURRENT_SOURCE_DIR}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_sources(mbed-os
 | 
			
		||||
    PRIVATE
 | 
			
		||||
        mstd_mutex.cpp
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,47 @@
 | 
			
		|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
 | 
			
		||||
# SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 | 
			
		||||
mbed_add_cmake_directory_if_labels("TARGET")
 | 
			
		||||
add_subdirectory(minimal-printf)
 | 
			
		||||
 | 
			
		||||
target_include_directories(mbed-os
 | 
			
		||||
    PUBLIC
 | 
			
		||||
        ${CMAKE_CURRENT_SOURCE_DIR}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_sources(mbed-os
 | 
			
		||||
    PRIVATE
 | 
			
		||||
        ATCmdParser.cpp
 | 
			
		||||
        CThunkBase.cpp
 | 
			
		||||
        CriticalSectionLock.cpp
 | 
			
		||||
        DeepSleepLock.cpp
 | 
			
		||||
        FileBase.cpp
 | 
			
		||||
        FileHandle.cpp
 | 
			
		||||
        FilePath.cpp
 | 
			
		||||
        FileSystemHandle.cpp
 | 
			
		||||
        LocalFileSystem.cpp
 | 
			
		||||
        Stream.cpp
 | 
			
		||||
        SysTimer.cpp
 | 
			
		||||
        mbed_alloc_wrappers.cpp
 | 
			
		||||
        mbed_application.c
 | 
			
		||||
        mbed_assert.c
 | 
			
		||||
        mbed_atomic_impl.c
 | 
			
		||||
        mbed_board.c
 | 
			
		||||
        mbed_critical.c
 | 
			
		||||
        mbed_error.c
 | 
			
		||||
        mbed_error_hist.c
 | 
			
		||||
        mbed_interface.c
 | 
			
		||||
        mbed_mem_trace.cpp
 | 
			
		||||
        mbed_mktime.c
 | 
			
		||||
        mbed_mpu_mgmt.c
 | 
			
		||||
        mbed_os_timer.cpp
 | 
			
		||||
        mbed_poll.cpp
 | 
			
		||||
        mbed_power_mgmt.c
 | 
			
		||||
        mbed_retarget.cpp
 | 
			
		||||
        mbed_rtc_time.cpp
 | 
			
		||||
        mbed_sdk_boot.c
 | 
			
		||||
        mbed_semihost_api.c
 | 
			
		||||
        mbed_stats.c
 | 
			
		||||
        mbed_thread.cpp
 | 
			
		||||
        mbed_wait_api_no_rtos.c
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,24 @@
 | 
			
		|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
 | 
			
		||||
# SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function(_mbed_set_assembly_source)
 | 
			
		||||
    if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
 | 
			
		||||
        target_sources(mbed-os PRIVATE TOOLCHAIN_GCC/except.S)
 | 
			
		||||
    elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
 | 
			
		||||
        target_sources(mbed-os PRIVATE TOOLCHAIN_ARM/except.S)
 | 
			
		||||
    elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
 | 
			
		||||
        target_sources(mbed-os
 | 
			
		||||
            PRIVATE
 | 
			
		||||
                TOOLCHAIN_IAR/except.S
 | 
			
		||||
                TOOLCHAIN_IAR/cmain.S
 | 
			
		||||
        )
 | 
			
		||||
    endif()
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
_mbed_set_assembly_source()
 | 
			
		||||
 | 
			
		||||
target_sources(mbed-os
 | 
			
		||||
    PRIVATE
 | 
			
		||||
        mbed_fault_handler.c
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
# Copyright (c) 2020 ARM Limited. All rights reserved.
 | 
			
		||||
# SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 | 
			
		||||
target_include_directories(mbed-os
 | 
			
		||||
    PUBLIC
 | 
			
		||||
        ${CMAKE_CURRENT_SOURCE_DIR}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_sources(mbed-os
 | 
			
		||||
    PRIVATE
 | 
			
		||||
        mbed_printf_armlink_overrides.c
 | 
			
		||||
        mbed_printf_implementation.c
 | 
			
		||||
        mbed_printf_wrapper.c
 | 
			
		||||
)
 | 
			
		||||
		Loading…
	
		Reference in New Issue