initial. libsoundio works.
This commit is contained in:
parent
bef8e24570
commit
fe58249d4f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
build/
|
||||||
|
out/
|
||||||
29
CMakeLists.txt
Normal file
29
CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.28)
|
||||||
|
|
||||||
|
project(voice-chat
|
||||||
|
VERSION 0.1.0
|
||||||
|
LANGUAGES C)
|
||||||
|
|
||||||
|
set(C_STANDARD 23)
|
||||||
|
set(C_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} src/main.c)
|
||||||
|
|
||||||
|
# TODO: set with if checks
|
||||||
|
set(ENABLE_ALSA ON CACHE BOOL "")
|
||||||
|
set(ENABLE_PULSEAUDIO OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_JACK OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_COREAUDIO OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_WASAPI OFF CACHE BOOL "")
|
||||||
|
set(BUILD_EXAMPLE_PROGRAMS OFF CACHE BOOL "")
|
||||||
|
|
||||||
|
set(BUILD_DYNAMIC_LIBS ON CACHE BOOL "" FORCE)
|
||||||
|
set(BUILD_STATIC_LIBS ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
add_subdirectory("${CMAKE_SOURCE_DIR}/extern/libsoundio")
|
||||||
|
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/extern/libsoundio")
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
||||||
|
$<$<CONFIG:Debug>:libsoundio_shared>
|
||||||
|
$<$<CONFIG:Release>:libsoundio_static>
|
||||||
|
)
|
||||||
30
CMakePresets.json
Normal file
30
CMakePresets.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"configurePresets": [
|
||||||
|
{
|
||||||
|
"name": "dev",
|
||||||
|
"displayName": "Linux Development",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"binaryDir": "${sourceDir}/build",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_BUILD_TYPE": "DEBUG",
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
|
|
||||||
|
"BUILD_EXAMPLE_PROGRAMS": true,
|
||||||
|
"BUILD_TESTS": false,
|
||||||
|
"ENABLE_ALSA": true,
|
||||||
|
"ENABLE_PULSEAUDIO": false,
|
||||||
|
"ENABLE_JACK": false,
|
||||||
|
"ENABLE_COREAUDIO": false,
|
||||||
|
"ENABLE_WASAPI": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"buildPresets": [
|
||||||
|
{
|
||||||
|
"name": "debug",
|
||||||
|
"configurePreset": "dev"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/main.c
Normal file
8
src/main.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[]) {
|
||||||
|
printf("Hello, %s\n", argv[0]);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
9
src/ntypes.h
Normal file
9
src/ntypes.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// num types
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
typedef int8_t char_t;
|
||||||
|
typedef uint8_t uchar_t;
|
||||||
|
|
||||||
|
typedef unsigned int uint;
|
||||||
Loading…
x
Reference in New Issue
Block a user