修改头文件修复编译错误
This commit is contained in:
parent
4746178a62
commit
83c7a1fc7d
@ -1,14 +1,15 @@
|
|||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(arona_core)
|
project(arona_core)
|
||||||
|
|
||||||
function(retrieve_files out_files)
|
function(retrieve_files path out_files)
|
||||||
set(source_list)
|
set(source_list)
|
||||||
|
message(STATUS "Retrieving files in ${path}")
|
||||||
|
|
||||||
# 递归查找文件夹下的 .h .hpp. ini 文件保存到 HEAD_FILES
|
# 递归查找文件夹下的 .h .hpp. ini 文件保存到 HEAD_FILES
|
||||||
file(GLOB_RECURSE HEAD_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS *.h *.hpp *.ini)
|
file(GLOB_RECURSE HEAD_FILES RELATIVE ${path} CONFIGURE_DEPENDS *.h *.hpp *.ini)
|
||||||
|
|
||||||
# 递归查找文件夹下的 *.cpp *.c 文件保存到 SRC_FILES
|
# 递归查找文件夹下的 *.cpp *.c 文件保存到 SRC_FILES
|
||||||
file(GLOB_RECURSE SRC_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS *.cpp *.c)
|
file(GLOB_RECURSE SRC_FILES RELATIVE ${path} CONFIGURE_DEPENDS *.cpp *.c *.ixx)
|
||||||
|
|
||||||
# 将 HEDADER_FILES 和 SRC_FILES 保存到 ALL_FILES 变量
|
# 将 HEDADER_FILES 和 SRC_FILES 保存到 ALL_FILES 变量
|
||||||
set(ALL_FILES ${HEAD_FILES} ${SRC_FILES})
|
set(ALL_FILES ${HEAD_FILES} ${SRC_FILES})
|
||||||
@ -45,7 +46,7 @@ function(retrieve_files out_files)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Remove common directory prefix to make the group
|
# Remove common directory prefix to make the group
|
||||||
string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" GROUP "${PARENT_DIR}")
|
string(REPLACE "${path}" "" GROUP "${PARENT_DIR}")
|
||||||
# Make sure we are using windows slashes
|
# Make sure we are using windows slashes
|
||||||
string(REPLACE "/" "\\" GROUP "${GROUP}")
|
string(REPLACE "/" "\\" GROUP "${GROUP}")
|
||||||
# Group into "Source Files" and "Header Files"
|
# Group into "Source Files" and "Header Files"
|
||||||
|
@ -3,7 +3,7 @@ project(core)
|
|||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
|
||||||
set(ALL_FILES "")
|
set(ALL_FILES "")
|
||||||
retrieve_files(ALL_FILES)
|
retrieve_files(${CMAKE_CURRENT_SOURCE_DIR} ALL_FILES)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${ALL_FILES})
|
add_library(${PROJECT_NAME} SHARED ${ALL_FILES})
|
||||||
|
|
||||||
@ -13,7 +13,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} rt
|
|||||||
target_link_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} rtaudio spdlog mempool Taskflow)
|
target_link_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} rtaudio spdlog mempool Taskflow)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC rtaudio spdlog mempool Taskflow)
|
target_link_libraries(${PROJECT_NAME} PUBLIC rtaudio spdlog mempool Taskflow)
|
||||||
|
|
||||||
target_precompile_headers(${PROJECT_NAME} PUBLIC extern.h)
|
|
||||||
add_definitions(-Dcore_EXPORTS)
|
add_definitions(-Dcore_EXPORTS)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "extern.h"
|
||||||
|
#include "spdlog/logger.h"
|
||||||
|
|
||||||
class renderer;
|
class renderer;
|
||||||
class render_target;
|
class render_target;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "audio/mixer/mixer_track.h"
|
#include "audio/mixer/mixer_track.h"
|
||||||
#include "audio/plugin_host/midi_sequencer.h"
|
#include "audio/plugin_host/midi_sequencer.h"
|
||||||
#include "audio/plugin_host/plugin_host_manager.h"
|
#include "audio/plugin_host/plugin_host_manager.h"
|
||||||
|
#include "spdlog/spdlog.h"
|
||||||
#include "thread_message/thread_message_hubs.h"
|
#include "thread_message/thread_message_hubs.h"
|
||||||
|
|
||||||
int rt_audio_callback(void *output_buffer, void *input_buffer,
|
int rt_audio_callback(void *output_buffer, void *input_buffer,
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
#include <mutex>
|
||||||
|
#include <vector>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
class CORE_API audio_buffer {
|
class CORE_API audio_buffer {
|
||||||
public:
|
public:
|
||||||
|
@ -4,6 +4,15 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include "extern.h"
|
#include "extern.h"
|
||||||
|
#include "spdlog/spdlog.h"
|
||||||
|
|
||||||
|
#if defined(_DEBUG) || defined(DEBUG)
|
||||||
|
#define checkf(expr, msg, ...) if (!(expr)) { spdlog::error(msg, __VA_ARGS__); throw std::runtime_error(fmt::format(msg, __VA_ARGS__)); }
|
||||||
|
#define check(expr) if (!(expr)) { spdlog::error("Check failed: {}", #expr); throw std::runtime_error(fmt::format("Check failed: {}", #expr)); }
|
||||||
|
#else
|
||||||
|
#define checkf(...)
|
||||||
|
#define check(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic implementation of a circular buffer built for pushing and popping arbitrary amounts of data at once.
|
* Basic implementation of a circular buffer built for pushing and popping arbitrary amounts of data at once.
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class mixer_track;
|
class mixer_track;
|
||||||
class channel_node;
|
class channel_node;
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class mixer_track;
|
class mixer_track;
|
||||||
class channel_interface;
|
class channel_interface;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "misc/singleton/singleton.h"
|
#include "misc/singleton/singleton.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class plugin_host;
|
class plugin_host;
|
||||||
class channel_interface;
|
class channel_interface;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "misc/singleton/singleton.h"
|
#include "misc/singleton/singleton.h"
|
||||||
|
|
||||||
class midi_sequencer : public singleton_t<midi_sequencer> {
|
class midi_sequencer : public singleton_t<midi_sequencer> {
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
class mixer_track;
|
class mixer_track;
|
||||||
class channel_interface;
|
class channel_interface;
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "spdlog/spdlog.h"
|
|
||||||
|
|
||||||
#ifdef core_EXPORTS
|
#ifdef core_EXPORTS
|
||||||
#define CORE_API __declspec(dllexport)
|
#define CORE_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define CORE_API __declspec(dllimport)
|
#define CORE_API __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(DEBUG)
|
|
||||||
#define checkf(expr, msg, ...) if (!(expr)) { spdlog::error(msg, __VA_ARGS__); throw std::runtime_error(fmt::format(msg, __VA_ARGS__)); }
|
|
||||||
#define check(expr) if (!(expr)) { spdlog::error("Check failed: {}", #expr); throw std::runtime_error(fmt::format("Check failed: {}", #expr)); }
|
|
||||||
#else
|
|
||||||
#define checkf(...)
|
|
||||||
#define check(...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ Raw delegate payload: 10
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
//////////////////// DEFINES SECTION //////////////////////////
|
//////////////////// DEFINES SECTION //////////////////////////
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "singleton_manager.h"
|
#include "singleton_manager.h"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "singleton.h"
|
#include "singleton.h"
|
||||||
|
|
||||||
bool singleton_initliazer::has_init(singleton* s) {
|
bool singleton_initliazer::has_init(singleton* s) {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
class singleton;
|
class singleton;
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <functional>
|
||||||
|
#include "extern.h"
|
||||||
|
|
||||||
class CORE_API thread_message {
|
class CORE_API thread_message {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user