Skip to content

Commit

Permalink
refactor: project file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
taurusxin committed Mar 24, 2024
1 parent ae08d44 commit aa7ae61
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ if(MSVC)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/execution-charset:utf-8>")
endif()

FILE(GLOB HEADERS ./*.h)
FILE(GLOB COMMON_SOURCES cJSON.cpp aes.cpp main.cpp ncmcrypt.cpp)
FILE(GLOB WIN_SOURCES win32_init.cpp)
FILE(GLOB HEADERS ./src/include/*.h)
FILE(GLOB COMMON_SOURCES ./src/*.cpp ./src/utils/*.cpp)
FILE(GLOB WIN_SOURCES ./src/platform/win32_init.cpp)


if(WIN32)
set(SOURCES ${COMMON_SOURCES} ${WIN_SOURCES})
Expand All @@ -27,6 +28,9 @@ add_executable(ncmdump
${HEADERS}
${SOURCES}
)

target_include_directories(ncmdump PRIVATE src/include)

target_link_libraries(ncmdump tag)
target_include_directories(ncmdump PRIVATE taglib)
target_include_directories(ncmdump PRIVATE taglib/taglib)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions main.cpp → src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ int main(int argc, char **argv)
#define COMPARE_STR(s1, s2) (strcmp(s1, s2) == 0)
#define HELP_SHORT "-h"
#define HELP_LONG "--help"
#define FOLDER "-d"
#define PROCESS_FOLDER "-d"
for (int i = 1; i < argc; ++i)
{
if (COMPARE_STR(argv[i], HELP_SHORT) || COMPARE_STR(argv[i], HELP_LONG))
{
displayHelp();
return 0;
}
else if (COMPARE_STR(argv[i], FOLDER))
else if (COMPARE_STR(argv[i], PROCESS_FOLDER))
{
processFolders = true;
if (i + 1 < argc && argv[i + 1][0] != '-')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit aa7ae61

Please sign in to comment.