kgg-dec/CMakeLists.txt

45 lines
1.2 KiB
CMake
Raw Normal View History

2024-10-17 00:50:14 +00:00
cmake_minimum_required(VERSION 3.10)
2024-12-20 02:03:20 +00:00
project(kgg-dec VERSION 0.6.0 LANGUAGES CXX)
2024-10-17 00:50:14 +00:00
2024-12-20 19:42:16 +00:00
option(USE_WIN_SQLITE3 "Use Windows SQLite3 (MSVC Only)" ${MSVC})
add_subdirectory(third-party/aes)
add_subdirectory(third-party/md5)
2024-12-20 19:42:16 +00:00
include(cmake/FindWinSQLite3.cmake)
if (NOT WinSQLite3_Found)
message("including sqlite3 to the build")
add_subdirectory(third-party/sqlite3)
endif ()
2024-10-17 00:50:14 +00:00
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(kgg-dec
2024-10-17 23:11:16 +00:00
src/main.cpp
src/common/base64.cpp
src/infra/infra.cpp
src/tc_tea/tc_tea.cpp
src/qmc2/ekey.cpp
src/qmc2/qmc2_factory.cpp
src/qmc2/qmc2_map.cpp
src/qmc2/qmc2_rc4.cpp
src/utils/cli.cpp
2024-10-17 00:50:14 +00:00
)
target_include_directories(kgg-dec
2024-10-17 23:11:16 +00:00
PRIVATE
2024-10-17 00:50:14 +00:00
src/common
src/tc_tea
)
2024-12-20 19:42:16 +00:00
target_link_libraries(kgg-dec PRIVATE shell32 ole32 libaes libmd5)
if (WinSQLite3_Found)
target_link_libraries(kgg-dec PRIVATE WinSQLite3)
target_include_directories(kgg-dec PRIVATE ${WindowsKitInclude})
else ()
target_link_libraries(kgg-dec PRIVATE sqlite3)
endif ()
2024-10-17 23:11:16 +00:00
target_compile_definitions(kgg-dec PRIVATE NOMINMAX)
target_compile_definitions(kgg-dec PRIVATE KGGDEC_PROJECT_VERSION="${PROJECT_VERSION}")