2019-06-02 03:33:40 +08:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2019-02-03 07:03:40 +08:00
|
|
|
add_executable(sof-logger
|
|
|
|
logger.c
|
|
|
|
convert.c
|
2020-05-29 20:41:30 +08:00
|
|
|
filter.c
|
2020-08-24 13:38:27 +08:00
|
|
|
misc.c
|
2019-02-03 07:03:40 +08:00
|
|
|
)
|
|
|
|
|
2022-02-03 01:39:16 +08:00
|
|
|
if(${CMAKE_HOST_WIN32})
|
|
|
|
cmake_minimum_required(VERSION 3.20)
|
|
|
|
if(DEFINED ENV{MSYS_INSTALL_DIR})
|
|
|
|
set(MSYS_INSTALL_DIR $ENV{MSYS_INSTALL_DIR})
|
|
|
|
cmake_path(IS_ABSOLUTE MSYS_INSTALL_DIR IS_MSYS_INSTALL_DIR_ABSOLUTE)
|
|
|
|
if(NOT IS_MSYS_INSTALL_DIR_ABSOLUTE)
|
|
|
|
message(FATAL_ERROR "Please provide absolute path to MSYS2 installation
|
|
|
|
setting MSYS_INSTALL_DIR env variable")
|
|
|
|
endif()
|
|
|
|
cmake_path(APPEND MSYS_INSTALL_DIR "usr" "include" OUTPUT_VARIABLE MSYS_SYSTEM_INCLUDE_PATH)
|
|
|
|
target_include_directories(sof-logger PRIVATE "${MSYS_SYSTEM_INCLUDE_PATH}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-02-03 07:03:40 +08:00
|
|
|
target_compile_options(sof-logger PRIVATE
|
|
|
|
-Wall -Werror
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(sof-logger PRIVATE
|
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}/src/include"
|
2020-05-25 20:19:43 +08:00
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}/rimage/src/include"
|
2019-02-03 07:03:40 +08:00
|
|
|
"${SOF_ROOT_SOURCE_DIRECTORY}"
|
|
|
|
)
|
2019-02-03 10:19:25 +08:00
|
|
|
|
|
|
|
install(TARGETS sof-logger DESTINATION bin)
|