From 0e1b9f69d96508e55c6b8631c42278d6e1765957 Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Fri, 22 Mar 2024 12:26:19 +0800 Subject: [PATCH] fix: CMakeLists.txt --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 327ef8f..dce0630 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,14 @@ if(MSVC) endif() FILE(GLOB HEADERS ./*.h) -FILE(GLOB SOURCES ./*.cpp) +FILE(GLOB COMMON_SOURCES cJSON.cpp aes.cpp main.cpp ncmcrypt.cpp) +FILE(GLOB WIN_SOURCES win32_init.cpp) + +if(WIN32) + set(SOURCES ${COMMON_SOURCES} ${WIN_SOURCES}) +else() + set(SOURCES ${COMMON_SOURCES}) +endif() add_executable(ncmdump ${HEADERS} ${SOURCES} @@ -28,7 +35,7 @@ target_include_directories(ncmdump PRIVATE taglib/taglib/mpeg/id3v2) if(WIN32) if(CMAKE_COMPILER_IS_GNUCXX) - target_link_options(ncmdump PRIVATE -municode -static) + target_link_options(ncmdump PRIVATE -static) endif() endif()