0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 11:22:00 +01:00

stuff for developing, actual debug mode as well as add the vban protocol specs

This commit is contained in:
2025-05-25 12:37:07 +02:00
parent f8c1671de2
commit a19427c9c4
11 changed files with 70 additions and 16 deletions

View File

@@ -5,6 +5,11 @@ project(FMTools LANGUAGES C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED YES)
# Set default build type if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
file(GLOB SRC_FILES "src/*.c")
file(GLOB DSP_FILES "dsp/*.c")
@@ -19,6 +24,12 @@ add_library(libfmdsp OBJECT ${DSP_FILES})
add_library(libfmio OBJECT ${IO_FILES})
# Define DEBUG macro for Debug builds on libraries
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(libfmdsp PRIVATE DEBUG=1)
target_compile_definitions(libfmio PRIVATE DEBUG=1)
endif()
set(FM_LIBS libfmio libfmdsp pulse pulse-simple m liquid)
foreach(SRC_FILE ${SRC_FILES})
@@ -27,10 +38,15 @@ foreach(SRC_FILE ${SRC_FILES})
add_executable(${EXEC_NAME} ${SRC_FILE})
target_compile_options(${EXEC_NAME} PRIVATE -O2 -Wall -Wextra -Werror -Wno-unused-parameter)
target_link_libraries(${EXEC_NAME} PRIVATE ${FM_LIBS})
# Define DEBUG macro for Debug builds
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${EXEC_NAME} PRIVATE DEBUG=1)
endif()
install(TARGETS ${EXEC_NAME}
DESTINATION /usr/bin
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ)
endforeach()
endforeach()