Merge branch 'master' into scaling

This commit is contained in:
tildearrow 2022-10-19 22:59:47 -05:00
commit b545fa7f3c
3 changed files with 87 additions and 7 deletions

View File

@ -2,6 +2,10 @@
## Important changes
### V 2.1.1 (2022-10-20)
Add C++11 detection for CMake
### V 2.1.0 (2022-09-08)
Move source folder into vgsound_emu folder

View File

@ -8,9 +8,11 @@
cmake_minimum_required(VERSION 3.0)
project(vgsound_emu
VERSION 2.1.0
VERSION 2.1.1
LANGUAGES CXX)
enable_language(CXX)
option(VGSOUND_EMU_ES5504 "Use ES5504 core" ON)
option(VGSOUND_EMU_ES5505 "Use ES5505 core" ON)
option(VGSOUND_EMU_ES5506 "Use ES5506 core" ON)
@ -31,19 +33,80 @@ message(STATUS "Generator: ${CMAKE_GENERATOR}")
message(STATUS "Extra generator: ${CMAKE_EXTRA_GENERATOR}")
message(STATUS "Make program: ${CMAKE_MAKE_PROGRAM}")
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.1.0")
message(STATUS "Generating C++11 compile features:")
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.8.0")
set(cxx_features cxx_std_11)
else()
set(cxx_features
cxx_template_template_parameters
cxx_alias_templates
cxx_alignas
cxx_alignof
cxx_attributes
cxx_auto_type
cxx_constexpr
cxx_decltype
cxx_decltype_incomplete_return_types
cxx_default_function_template_args
cxx_defaulted_functions
cxx_defaulted_move_initializers
cxx_delegating_constructors
cxx_deleted_functions
cxx_enum_forward_declarations
cxx_explicit_conversions
cxx_extended_friend_declarations
cxx_extern_templates
cxx_final
cxx_func_identifier
cxx_generalized_initializers
cxx_inheriting_constructors
cxx_inline_namespaces
cxx_lambdas
cxx_local_type_template_args
cxx_long_long_type
cxx_noexcept
cxx_nonstatic_member_init
cxx_nullptr
cxx_override
cxx_range_for
cxx_raw_string_literals
cxx_reference_qualified_functions
cxx_right_angle_brackets
cxx_rvalue_references
cxx_sizeof_member
cxx_static_assert
cxx_strong_enums
cxx_thread_local
cxx_trailing_return_types
cxx_unicode_literals
cxx_uniform_initialization
cxx_unrestricted_unions
cxx_user_literals
cxx_variadic_macros
cxx_variadic_templates)
endif()
message(STATUS "${cxx_features}")
endif()
set(CORE_SOURCE "")
set(EMU_SOURCE "")
# Core functions
list(APPEND CORE_SOURCE
vgsound_emu/src/core/util.hpp
vgsound_emu/src/core/core.hpp
vgsound_emu/src/core/util/clock_pulse.hpp
vgsound_emu/src/core/util/fifo.hpp
vgsound_emu/src/core/util/mem_intf.hpp
)
# Dialogic ADPCM
if(VGSOUND_EMU_MSM6295)
list(APPEND CORE_SOURCE
vgsound_emu/src/core/vox/vox.cpp
vgsound_emu/src/core/vox/vox.hpp
vgsound_emu/src/core/vox/vox.cpp
)
message(STATUS "Using Dialogic ADPCM core")
endif()
@ -156,6 +219,18 @@ if(VGSOUND_EMU_X1_010)
endif()
add_library(vgsound_emu STATIC ${CORE_SOURCE} ${EMU_SOURCE})
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.1.0")
set_target_properties(vgsound_emu
PROPERTIES
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF)
target_compile_features(vgsound_emu PRIVATE ${cxx_features})
message(STATUS "C++11 Enabled")
endif()
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
# target_compile_options(vgsound_emu PRIVATE -Wall -Werror)
# for Test purpose (GCC)
# target_compile_options(vgsound_emu PRIVATE -Wall -Wextra -Werror)

View File

@ -1,6 +1,6 @@
# vgsound_emu V2 (modified)
This is a library of video game sound chip emulation cores. useful for emulators, chiptune trackers, or players.
This is a C++ library of video game sound chip emulation cores. useful for emulators, chiptune trackers, or players.
This is a modified version of vgsound_emu, tailored for Furnace.
@ -46,7 +46,8 @@ See [here](https://gitlab.com/cam900/vgsound_emu/-/blob/main/LICENSE) for detail
### dependencies
- CMake
- C++11 (or later)
- CMake (3.1 or later is recommended)
- git (for source repository management)
- MSVC or GCC or Clang (for compile)
@ -59,7 +60,7 @@ git clone https://gitlab.com/cam900/vgsound_emu.git
cd vgsound_emu
```
### Compile
### Compile with CMake
#### MSVC