mirror of
https://github.com/taurusxin/ncmdump.git
synced 2025-07-14 21:42:11 +08:00
feat:添加taglib子仓库;使用CMake构建项目
This commit is contained in:
parent
b690e840bd
commit
0934d1f5e6
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "taglib"]
|
||||
path = taglib
|
||||
url = git@github.com:taglib/taglib.git
|
31
CMakeLists.txt
Normal file
31
CMakeLists.txt
Normal file
@ -0,0 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(ncmdump LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
FILE(GLOB HEADERS ./*.h)
|
||||
FILE(GLOB SOURCES ./*.cpp)
|
||||
add_executable(ncmdump
|
||||
${HEADERS}
|
||||
${SOURCES}
|
||||
)
|
||||
add_subdirectory(taglib)
|
||||
target_link_libraries(ncmdump tag)
|
||||
target_include_directories(ncmdump PRIVATE taglib)
|
||||
target_include_directories(ncmdump PRIVATE taglib/taglib)
|
||||
target_include_directories(ncmdump PRIVATE taglib/taglib/toolkit)
|
||||
target_include_directories(ncmdump PRIVATE taglib/taglib/mpeg/id3v2)
|
||||
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS ncmdump
|
||||
BUNDLE DESTINATION .
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
11
ncmcrypt.cpp
11
ncmcrypt.cpp
@ -4,11 +4,12 @@
|
||||
#include "cJSON.h"
|
||||
|
||||
#define TAGLIB_STATIC
|
||||
#include <taglib/mpegfile.h>
|
||||
#include <taglib/flacfile.h>
|
||||
#include <taglib/attachedpictureframe.h>
|
||||
#include <taglib/id3v2tag.h>
|
||||
#include <taglib/tag.h>
|
||||
#include "taglib/toolkit/tfile.h"
|
||||
#include "taglib/mpeg/mpegfile.h"
|
||||
#include "taglib/flac/flacfile.h"
|
||||
#include "taglib/mpeg/id3v2/frames/attachedpictureframe.h"
|
||||
#include "taglib/mpeg/id3v2/id3v2tag.h"
|
||||
#include "taglib/tag.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
1
taglib
Submodule
1
taglib
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 0896fb90920c125e55248360d271d1a1674e2a4d
|
Loading…
Reference in New Issue
Block a user