103 lines
3.3 KiB
CMake
103 lines
3.3 KiB
CMake
# CROSS COMPILER SETTING
|
|
SET(CMAKE_SYSTEM_NAME Generic)
|
|
CMAKE_MINIMUM_REQUIRED (VERSION 3.10.0)
|
|
|
|
# THE VERSION NUMBER
|
|
SET (MCUXPRESSO_CMAKE_FORMAT_MAJOR_VERSION 2)
|
|
SET (MCUXPRESSO_CMAKE_FORMAT_MINOR_VERSION 0)
|
|
|
|
include(ide_overrides.cmake OPTIONAL)
|
|
|
|
if(CMAKE_SCRIPT_MODE_FILE)
|
|
message("${MCUXPRESSO_CMAKE_FORMAT_MAJOR_VERSION}")
|
|
return()
|
|
endif()
|
|
|
|
|
|
# ENABLE ASM
|
|
ENABLE_LANGUAGE(ASM)
|
|
|
|
SET(CMAKE_STATIC_LIBRARY_PREFIX)
|
|
SET(CMAKE_STATIC_LIBRARY_SUFFIX)
|
|
|
|
SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX)
|
|
SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX)
|
|
|
|
# CURRENT DIRECTORY
|
|
SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
SET(EXECUTABLE_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})
|
|
SET(LIBRARY_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})
|
|
|
|
|
|
project(maestro_usb_speaker)
|
|
|
|
set(MCUX_BUILD_TYPES debug release)
|
|
|
|
set(MCUX_SDK_PROJECT_NAME maestro_usb_speaker.elf)
|
|
|
|
if (NOT DEFINED SdkRootDirPath)
|
|
SET(SdkRootDirPath ${ProjDirPath}/../../../../../..)
|
|
endif()
|
|
|
|
include(${ProjDirPath}/flags.cmake)
|
|
|
|
include(${ProjDirPath}/config.cmake)
|
|
|
|
add_executable(${MCUX_SDK_PROJECT_NAME}
|
|
"${ProjDirPath}/../streamer_pcm.c"
|
|
"${ProjDirPath}/../streamer_pcm.h"
|
|
"${ProjDirPath}/../usb_device_config.h"
|
|
"${ProjDirPath}/../app_streamer.c"
|
|
"${ProjDirPath}/../app_streamer.h"
|
|
"${ProjDirPath}/../cmd.c"
|
|
"${ProjDirPath}/../cmd.h"
|
|
"${ProjDirPath}/../ffconf.h"
|
|
"${ProjDirPath}/../main.c"
|
|
"${ProjDirPath}/../main.h"
|
|
"${ProjDirPath}/../usb_device_descriptor.h"
|
|
"${ProjDirPath}/../usb_device_descriptor.c"
|
|
"${ProjDirPath}/../audio_speaker.h"
|
|
"${ProjDirPath}/../audio_speaker.c"
|
|
"${ProjDirPath}/../pin_mux.c"
|
|
"${ProjDirPath}/../pin_mux.h"
|
|
"${ProjDirPath}/../FreeRTOSConfig.h"
|
|
"${ProjDirPath}/../app_definitions.h"
|
|
"${ProjDirPath}/../board.c"
|
|
"${ProjDirPath}/../board.h"
|
|
"${ProjDirPath}/../clock_config.c"
|
|
"${ProjDirPath}/../clock_config.h"
|
|
"${ProjDirPath}/../usb_device_ch9.c"
|
|
"${ProjDirPath}/../usb_device_ch9.h"
|
|
"${ProjDirPath}/../usb_device_class.c"
|
|
"${ProjDirPath}/../usb_device_class.h"
|
|
"${ProjDirPath}/../usb_device_audio.c"
|
|
"${ProjDirPath}/../usb_device_audio.h"
|
|
)
|
|
|
|
target_include_directories(${MCUX_SDK_PROJECT_NAME} PRIVATE
|
|
${ProjDirPath}/..
|
|
${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/maestro_usb_speaker
|
|
)
|
|
|
|
set_source_files_properties("${ProjDirPath}/../streamer_pcm.c" PROPERTIES COMPONENT_CONFIG_FILE "middleware_maestro_framework_template")
|
|
set_source_files_properties("${ProjDirPath}/../streamer_pcm.h" PROPERTIES COMPONENT_CONFIG_FILE "middleware_maestro_framework_template")
|
|
set_source_files_properties("${ProjDirPath}/../usb_device_config.h" PROPERTIES COMPONENT_CONFIG_FILE "middleware_usb_device_ip3511fs_config_header")
|
|
set_source_files_properties("${ProjDirPath}/../ffconf.h" PROPERTIES COMPONENT_CONFIG_FILE "middleware_fatfs_template_ram")
|
|
set_source_files_properties("${ProjDirPath}/../FreeRTOSConfig.h" PROPERTIES COMPONENT_CONFIG_FILE "middleware_freertos-kernel_template")
|
|
|
|
include(${SdkRootDirPath}/devices/LPC55S69/all_lib_device.cmake)
|
|
|
|
IF(NOT DEFINED TARGET_LINK_SYSTEM_LIBRARIES)
|
|
SET(TARGET_LINK_SYSTEM_LIBRARIES "-lm -lc -lgcc -lnosys")
|
|
ENDIF()
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--start-group)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${TARGET_LINK_SYSTEM_LIBRARIES})
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--end-group)
|
|
|
|
set_target_properties(${MCUX_SDK_PROJECT_NAME} PROPERTIES ADDITIONAL_CLEAN_FILES "output.map")
|
|
|