mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Add XMPlay CMake script, fix bug, cleanup
This commit is contained in:
parent
78748393db
commit
4fc51407e9
@ -37,6 +37,7 @@ if(WIN32)
|
|||||||
set(FB2K_SDK_PATH CACHE PATH "Path to foobar2000 SDK")
|
set(FB2K_SDK_PATH CACHE PATH "Path to foobar2000 SDK")
|
||||||
set(WTL_INCLUDE_PATH CACHE PATH "Path to WTL include directory")
|
set(WTL_INCLUDE_PATH CACHE PATH "Path to WTL include directory")
|
||||||
option(BUILD_WINAMP "Build Winamp plugin" ON)
|
option(BUILD_WINAMP "Build Winamp plugin" ON)
|
||||||
|
option(BUILD_XMPLAY "Build XMPlay plugin" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@ -174,6 +175,9 @@ if(WIN32)
|
|||||||
include_external_msproject(pfc ${FB2K_SDK_PATH}/pfc/pfc.vcxproj)
|
include_external_msproject(pfc ${FB2K_SDK_PATH}/pfc/pfc.vcxproj)
|
||||||
add_subdirectory(fb2k)
|
add_subdirectory(fb2k)
|
||||||
endif()
|
endif()
|
||||||
|
if(BUILD_XMPLAY)
|
||||||
|
add_subdirectory(xmplay)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_CLI)
|
if(BUILD_CLI)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@ -205,5 +209,6 @@ message(STATUS " CLI: ${BUILD_CLI}")
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
message(STATUS "foobar2000 component: ${BUILD_FB2K}")
|
message(STATUS "foobar2000 component: ${BUILD_FB2K}")
|
||||||
message(STATUS " Winamp plugin: ${BUILD_WINAMP}")
|
message(STATUS " Winamp plugin: ${BUILD_WINAMP}")
|
||||||
|
message(STATUS " XMPlay plugin: ${BUILD_XMPLAY}")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
|
@ -123,5 +123,4 @@ macro(setup_target TARGET)
|
|||||||
${CMAKE_BINARY_DIR}/ext_libs/libcelt-0110.lib)
|
${CMAKE_BINARY_DIR}/ext_libs/libcelt-0110.lib)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
# NOTE: Although this does include a section for handling MinGW, it might not be possible to build the foobar2000 component using MinGW using only CMake, as foobar2000's SDK only includes Visual Studio projects
|
# NOTE: Although this does include a section for handling MinGW, it might not be possible to build the foobar2000 component using MinGW using only CMake, as foobar2000's SDK only includes Visual Studio projects
|
||||||
|
|
||||||
|
set(RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/foo_input_vgmstream.rc)
|
||||||
|
|
||||||
|
# Setup source groups, mainly for Visual Studio
|
||||||
|
source_group("Resource Files" FILES ${RESOURCES})
|
||||||
|
|
||||||
add_library(foo_input_vgmstream SHARED
|
add_library(foo_input_vgmstream SHARED
|
||||||
|
foo_filetypes.h
|
||||||
|
foo_prefs.h
|
||||||
|
foo_vgmstream.h
|
||||||
|
resource.h
|
||||||
foo_prefs.cpp
|
foo_prefs.cpp
|
||||||
foo_streamfile.cpp
|
foo_streamfile.cpp
|
||||||
foo_vgmstream.cpp
|
foo_vgmstream.cpp
|
||||||
foo_input_vgmstream.rc)
|
${RESOURCES})
|
||||||
|
|
||||||
setup_target(foo_input_vgmstream TRUE)
|
setup_target(foo_input_vgmstream TRUE)
|
||||||
|
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
|
file(GLOB WINAMP_SDK_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/sdk/*.h")
|
||||||
|
set(RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resource.rc)
|
||||||
|
|
||||||
|
# Setup source groups, mainly for Visual Studio
|
||||||
|
source_group("Header Files\\sdk" FILES ${WINAMP_SDK_HEADERS})
|
||||||
|
source_group("Resource Files" FILES ${RESOURCES})
|
||||||
|
|
||||||
add_library(in_vgmstream SHARED
|
add_library(in_vgmstream SHARED
|
||||||
|
${WINAMP_SDK_HEADERS}
|
||||||
|
resource.h
|
||||||
in_vgmstream.c
|
in_vgmstream.c
|
||||||
resource.rc)
|
${RESOURCES})
|
||||||
|
|
||||||
setup_target(in_vgmstream TRUE)
|
setup_target(in_vgmstream TRUE)
|
||||||
|
|
||||||
|
33
xmplay/CMakeLists.txt
Normal file
33
xmplay/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
add_library(xmp-vgmstream SHARED
|
||||||
|
xmpfunc.h
|
||||||
|
xmpin.h
|
||||||
|
xmp_vgmstream.c
|
||||||
|
xmpin.def)
|
||||||
|
|
||||||
|
setup_target(xmp-vgmstream TRUE)
|
||||||
|
|
||||||
|
# Remove the prefix and set the suffix to .dll
|
||||||
|
set_target_properties(xmp-vgmstream PROPERTIES
|
||||||
|
PREFIX ""
|
||||||
|
SUFFIX ".dll")
|
||||||
|
|
||||||
|
# Make sure that the binary directory is included (for version.h)
|
||||||
|
target_include_directories(xmp-vgmstream PRIVATE ${CMAKE_BINARY_DIR})
|
||||||
|
|
||||||
|
# Link to the vgmstream library
|
||||||
|
target_link_libraries(xmp-vgmstream libvgmstream)
|
||||||
|
|
||||||
|
# Include the version string
|
||||||
|
if(MSVC)
|
||||||
|
add_dependencies(xmp-vgmstream version_h)
|
||||||
|
elseif(MINGW)
|
||||||
|
if(VGMSTREAM_VERSION)
|
||||||
|
target_compile_definitions(xmp-vgmstream PRIVATE VERSION="${VGMSTREAM_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Also, on MinGW when using GCC, these flags need to be included to prevent requiring MinGW's runtime DLLs from being included, which does unfortunately increase the size of the DLL
|
||||||
|
if(NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
||||||
|
set_target_properties(xmp-vgmstream PROPERTIES
|
||||||
|
LINK_FLAGS "-static-libgcc -static-libstdc++")
|
||||||
|
endif()
|
||||||
|
endif()
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#include "../version.h"
|
#include "version.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#define VERSION "(unknown version)"
|
#define VERSION "(unknown version)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user