From 245cd01ce80550962f2fdc14d6a30bad29323bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Thu, 11 Jul 2024 22:33:54 +0200 Subject: [PATCH] Move to VCPKG. --- CMakeLists.txt | 15 ++++-- CMakePresets.json | 57 +++++++++++++++++++++ src/creation/CMakeLists.txt | 15 +++--- src/gamebryo/CMakeLists.txt | 17 +++--- src/games/enderal/CMakeLists.txt | 7 +-- src/games/enderal/src/CMakeLists.txt | 8 +-- src/games/enderalse/CMakeLists.txt | 7 +-- src/games/enderalse/src/CMakeLists.txt | 8 +-- src/games/fallout3/CMakeLists.txt | 7 +-- src/games/fallout3/src/CMakeLists.txt | 8 +-- src/games/fallout4/CMakeLists.txt | 7 +-- src/games/fallout4/src/CMakeLists.txt | 8 +-- src/games/fallout4london/CMakeLists.txt | 8 +-- src/games/fallout4london/src/CMakeLists.txt | 7 ++- src/games/fallout4vr/CMakeLists.txt | 7 +-- src/games/fallout4vr/src/CMakeLists.txt | 8 +-- src/games/fallout76/CMakeLists.txt | 7 +-- src/games/fallout76/src/CMakeLists.txt | 8 +-- src/games/falloutnv/CMakeLists.txt | 7 +-- src/games/falloutnv/src/CMakeLists.txt | 8 +-- src/games/morrowind/CMakeLists.txt | 7 +-- src/games/morrowind/src/CMakeLists.txt | 8 +-- src/games/nehrim/CMakeLists.txt | 7 +-- src/games/nehrim/src/CMakeLists.txt | 8 +-- src/games/oblivion/CMakeLists.txt | 7 +-- src/games/oblivion/src/CMakeLists.txt | 8 +-- src/games/skyrim/CMakeLists.txt | 7 +-- src/games/skyrim/src/CMakeLists.txt | 7 ++- src/games/skyrimse/CMakeLists.txt | 7 +-- src/games/skyrimse/src/CMakeLists.txt | 8 +-- src/games/skyrimvr/CMakeLists.txt | 7 +-- src/games/skyrimvr/src/CMakeLists.txt | 8 +-- src/games/starfield/CMakeLists.txt | 7 +-- src/games/starfield/src/CMakeLists.txt | 8 +-- src/games/ttw/CMakeLists.txt | 7 +-- src/games/ttw/src/CMakeLists.txt | 8 +-- vcpkg-configuration.json | 15 ++++++ vcpkg.json | 3 ++ 38 files changed, 181 insertions(+), 180 deletions(-) create mode 100644 CMakePresets.json create mode 100644 vcpkg-configuration.json create mode 100644 vcpkg.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b7ffba9..2fb76a4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,17 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake) -endif() +# TODO: clean include directives +set(MO2_CMAKE_DEPRECATED_UIBASE_INCLUDE ON) project(game_gamebryo) +find_package(mo2-cmake CONFIG REQUIRED) +find_package(Qt6 COMPONENTS Widgets) + add_subdirectory(src/gamebryo) add_subdirectory(src/creation) + +mo2_add_subdirectories( + FOLDER games + GLOB src/games/* +) diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 00000000..cc009b34 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,57 @@ +{ + "configurePresets": [ + { + "errors": { + "deprecated": true + }, + "hidden": true, + "name": "cmake-dev", + "warnings": { + "deprecated": true, + "dev": true + } + }, + { + "cacheVariables": { + "VCPKG_MANIFEST_NO_DEFAULT_FEATURES": { + "type": "BOOL", + "value": "ON" + } + }, + "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", + "hidden": true, + "name": "vcpkg" + }, + { + "hidden": true, + "inherits": ["vcpkg"], + "name": "vcpkg-dev" + }, + { + "binaryDir": "${sourceDir}/vsbuild", + "architecture": { + "strategy": "set", + "value": "x64" + }, + "cacheVariables": { + "CMAKE_CXX_FLAGS": "/EHsc /MP /W4", + "VCPKG_TARGET_TRIPLET": { + "type": "STRING", + "value": "x64-windows-static-md" + } + }, + "generator": "Visual Studio 17 2022", + "inherits": ["cmake-dev", "vcpkg-dev"], + "name": "vs2022-windows", + "toolset": "v143" + } + ], + "buildPresets": [ + { + "name": "vs2022-windows", + "resolvePackageReferences": "on", + "configurePreset": "vs2022-windows" + } + ], + "version": 4 +} diff --git a/src/creation/CMakeLists.txt b/src/creation/CMakeLists.txt index f2dce976..694eb1ea 100644 --- a/src/creation/CMakeLists.txt +++ b/src/creation/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.16) +find_package(lz4 CONFIG REQUIRED) + add_library(game_creation STATIC) -mo2_configure_library(game_creation - WARNINGS OFF - TRANSLATIONS ON - PUBLIC_DEPENDS uibase - PRIVATE_DEPENDS lz4) -target_link_libraries(game_creation PUBLIC game_gamebryo) -mo2_install_target(game_creation) +mo2_configure_target(game_creation WARNINGS OFF TRANSLATIONS ON) +target_link_libraries(game_creation PUBLIC game_gamebryo PRIVATE lz4::lz4) +target_include_directories(game_creation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + +install(FILES $ DESTINATION lib) + diff --git a/src/gamebryo/CMakeLists.txt b/src/gamebryo/CMakeLists.txt index cff88fc9..5465d916 100644 --- a/src/gamebryo/CMakeLists.txt +++ b/src/gamebryo/CMakeLists.txt @@ -1,10 +1,13 @@ cmake_minimum_required(VERSION 3.16) +find_package(mo2-uibase CONFIG REQUIRED) +find_package(lz4 CONFIG REQUIRED) +find_package(ZLIB REQUIRED) + add_library(game_gamebryo STATIC) -mo2_configure_library(game_gamebryo - WARNINGS OFF - TRANSLATIONS ON - AUTOMOC ON - PUBLIC_DEPENDS uibase - PRIVATE_DEPENDS zlib lz4) -mo2_install_target(game_gamebryo) +mo2_configure_target(game_gamebryo WARNINGS OFF TRANSLATIONS ON AUTOMOC ON) +target_link_libraries(game_gamebryo PUBLIC mo2::uibase PRIVATE ZLIB::ZLIB lz4::lz4 Dbghelp) +target_include_directories(game_gamebryo PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + +install(FILES $ DESTINATION lib) + diff --git a/src/games/enderal/CMakeLists.txt b/src/games/enderal/CMakeLists.txt index 35ab9691..3fb4c2df 100644 --- a/src/games/enderal/CMakeLists.txt +++ b/src/games/enderal/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_enderal) add_subdirectory(src) + diff --git a/src/games/enderal/src/CMakeLists.txt b/src/games/enderal/src/CMakeLists.txt index d387f62c..7b9e9b89 100644 --- a/src/games/enderal/src/CMakeLists.txt +++ b/src/games/enderal/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_enderal SHARED) -mo2_configure_plugin(game_enderal - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_enderal) +mo2_configure_plugin(game_enderal WARNINGS OFF) +target_link_libraries(game_enderal PRIVATE game_creation) +mo2_install_plugin(game_enderal) + diff --git a/src/games/enderalse/CMakeLists.txt b/src/games/enderalse/CMakeLists.txt index 97dbe510..918a924b 100644 --- a/src/games/enderalse/CMakeLists.txt +++ b/src/games/enderalse/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/../cmake_common/mo2.cmake) -endif() - project(game_enderalse) add_subdirectory(src) + diff --git a/src/games/enderalse/src/CMakeLists.txt b/src/games/enderalse/src/CMakeLists.txt index ae2cd266..4975a5c2 100644 --- a/src/games/enderalse/src/CMakeLists.txt +++ b/src/games/enderalse/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_enderalse SHARED) -mo2_configure_plugin(game_enderalse - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_enderalse) +mo2_configure_plugin(game_enderalse) +target_link_libraries(game_enderalse PRIVATE game_creation) +mo2_install_plugin(game_enderalse) + diff --git a/src/games/fallout3/CMakeLists.txt b/src/games/fallout3/CMakeLists.txt index ed7a20ca..2b67e78b 100644 --- a/src/games/fallout3/CMakeLists.txt +++ b/src/games/fallout3/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_fallout3) add_subdirectory(src) + diff --git a/src/games/fallout3/src/CMakeLists.txt b/src/games/fallout3/src/CMakeLists.txt index 9c7f1b28..41e19d65 100644 --- a/src/games/fallout3/src/CMakeLists.txt +++ b/src/games/fallout3/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_fallout3 SHARED) -mo2_configure_plugin(game_fallout3 - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_fallout3) +mo2_configure_plugin(game_fallout3) +target_link_libraries(game_fallout3 PRIVATE game_gamebryo) +mo2_install_plugin(game_fallout3) + diff --git a/src/games/fallout4/CMakeLists.txt b/src/games/fallout4/CMakeLists.txt index 1e0429a5..7a59129c 100644 --- a/src/games/fallout4/CMakeLists.txt +++ b/src/games/fallout4/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_fallout4) add_subdirectory(src) + diff --git a/src/games/fallout4/src/CMakeLists.txt b/src/games/fallout4/src/CMakeLists.txt index 42fc5582..4058674f 100644 --- a/src/games/fallout4/src/CMakeLists.txt +++ b/src/games/fallout4/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_fallout4 SHARED) -mo2_configure_plugin(game_fallout4 - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_fallout4) +mo2_configure_plugin(game_fallout4) +target_link_libraries(game_fallout4 PRIVATE game_creation) +mo2_install_plugin(game_fallout4) + diff --git a/src/games/fallout4london/CMakeLists.txt b/src/games/fallout4london/CMakeLists.txt index 31c1c8d7..0464866d 100644 --- a/src/games/fallout4london/CMakeLists.txt +++ b/src/games/fallout4london/CMakeLists.txt @@ -1,10 +1,4 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - -project(game_fallout4london) +project(game_fo4london) add_subdirectory(src) diff --git a/src/games/fallout4london/src/CMakeLists.txt b/src/games/fallout4london/src/CMakeLists.txt index d6e818f8..e2c085a8 100644 --- a/src/games/fallout4london/src/CMakeLists.txt +++ b/src/games/fallout4london/src/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.16) add_library(game_fo4london SHARED) -mo2_configure_plugin(game_fo4london - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_fo4london) +mo2_configure_plugin(game_fo4london) +target_link_libraries(game_fo4london PRIVATE game_creation) +mo2_install_plugin(game_fo4london) diff --git a/src/games/fallout4vr/CMakeLists.txt b/src/games/fallout4vr/CMakeLists.txt index b6c2f64e..40986e1e 100644 --- a/src/games/fallout4vr/CMakeLists.txt +++ b/src/games/fallout4vr/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_fallout4vr) add_subdirectory(src) + diff --git a/src/games/fallout4vr/src/CMakeLists.txt b/src/games/fallout4vr/src/CMakeLists.txt index 81d6ed0a..18fe32cc 100644 --- a/src/games/fallout4vr/src/CMakeLists.txt +++ b/src/games/fallout4vr/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_fallout4vr SHARED) -mo2_configure_plugin(game_fallout4vr - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_fallout4vr) +mo2_configure_plugin(game_fallout4vr) +target_link_libraries(game_fallout4vr PRIVATE game_creation) +mo2_install_plugin(game_fallout4vr) + diff --git a/src/games/fallout76/CMakeLists.txt b/src/games/fallout76/CMakeLists.txt index 4d895af7..cb8d1753 100644 --- a/src/games/fallout76/CMakeLists.txt +++ b/src/games/fallout76/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_fallout76) add_subdirectory(src) + diff --git a/src/games/fallout76/src/CMakeLists.txt b/src/games/fallout76/src/CMakeLists.txt index ece6b723..8eac197e 100644 --- a/src/games/fallout76/src/CMakeLists.txt +++ b/src/games/fallout76/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_fallout76 SHARED) -mo2_configure_plugin(game_fallout76 - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_fallout76) +mo2_configure_plugin(game_fallout76) +target_link_libraries(game_fallout76 PRIVATE game_creation) +mo2_install_plugin(game_fallout76) + diff --git a/src/games/falloutnv/CMakeLists.txt b/src/games/falloutnv/CMakeLists.txt index 1034de1f..921501d7 100644 --- a/src/games/falloutnv/CMakeLists.txt +++ b/src/games/falloutnv/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_falloutNV) add_subdirectory(src) + diff --git a/src/games/falloutnv/src/CMakeLists.txt b/src/games/falloutnv/src/CMakeLists.txt index 43cefd24..1e3a75fb 100644 --- a/src/games/falloutnv/src/CMakeLists.txt +++ b/src/games/falloutnv/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_falloutNV SHARED) -mo2_configure_plugin(game_falloutNV - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_falloutNV) +mo2_configure_plugin(game_falloutNV) +target_link_libraries(game_falloutNV PRIVATE game_gamebryo) +mo2_install_plugin(game_falloutNV) + diff --git a/src/games/morrowind/CMakeLists.txt b/src/games/morrowind/CMakeLists.txt index 188996d4..9a88f1b7 100644 --- a/src/games/morrowind/CMakeLists.txt +++ b/src/games/morrowind/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_morrowind) add_subdirectory(src) + diff --git a/src/games/morrowind/src/CMakeLists.txt b/src/games/morrowind/src/CMakeLists.txt index ffa7a6d1..2550c3e9 100644 --- a/src/games/morrowind/src/CMakeLists.txt +++ b/src/games/morrowind/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_morrowind SHARED) -mo2_configure_plugin(game_morrowind - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_morrowind) +mo2_configure_plugin(game_morrowind) +target_link_libraries(game_morrowind PRIVATE game_gamebryo) +mo2_install_plugin(game_morrowind) + diff --git a/src/games/nehrim/CMakeLists.txt b/src/games/nehrim/CMakeLists.txt index b5425ae8..7c66bb10 100644 --- a/src/games/nehrim/CMakeLists.txt +++ b/src/games/nehrim/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_nehrim) add_subdirectory(src) + diff --git a/src/games/nehrim/src/CMakeLists.txt b/src/games/nehrim/src/CMakeLists.txt index 3a0ab7ac..cd83d486 100644 --- a/src/games/nehrim/src/CMakeLists.txt +++ b/src/games/nehrim/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_nehrim SHARED) -mo2_configure_plugin(game_nehrim - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_nehrim) +mo2_configure_plugin(game_nehrim) +target_link_libraries(game_nehrim PRIVATE game_gamebryo) +mo2_install_plugin(game_nehrim) + diff --git a/src/games/oblivion/CMakeLists.txt b/src/games/oblivion/CMakeLists.txt index 3f9ac55a..ed3fe6d5 100644 --- a/src/games/oblivion/CMakeLists.txt +++ b/src/games/oblivion/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_oblivion) add_subdirectory(src) + diff --git a/src/games/oblivion/src/CMakeLists.txt b/src/games/oblivion/src/CMakeLists.txt index b6180c24..5deb9207 100644 --- a/src/games/oblivion/src/CMakeLists.txt +++ b/src/games/oblivion/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_oblivion SHARED) -mo2_configure_plugin(game_oblivion - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_oblivion) +mo2_configure_plugin(game_oblivion) +target_link_libraries(game_oblivion PRIVATE game_gamebryo) +mo2_install_plugin(game_oblivion) + diff --git a/src/games/skyrim/CMakeLists.txt b/src/games/skyrim/CMakeLists.txt index 37a5b620..4443dd43 100644 --- a/src/games/skyrim/CMakeLists.txt +++ b/src/games/skyrim/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_skyrim) add_subdirectory(src) + diff --git a/src/games/skyrim/src/CMakeLists.txt b/src/games/skyrim/src/CMakeLists.txt index 4d6af8ed..066df6ae 100644 --- a/src/games/skyrim/src/CMakeLists.txt +++ b/src/games/skyrim/src/CMakeLists.txt @@ -1,7 +1,6 @@ cmake_minimum_required(VERSION 3.16) add_library(game_skyrim SHARED) -mo2_configure_plugin(game_skyrim - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_skyrim) +mo2_configure_plugin(game_skyrim) +target_link_libraries(game_skyrim PRIVATE game_gamebryo Version) +mo2_install_plugin(game_skyrim) diff --git a/src/games/skyrimse/CMakeLists.txt b/src/games/skyrimse/CMakeLists.txt index e4564c51..9ffcde5e 100644 --- a/src/games/skyrimse/CMakeLists.txt +++ b/src/games/skyrimse/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_skyrimse) add_subdirectory(src) + diff --git a/src/games/skyrimse/src/CMakeLists.txt b/src/games/skyrimse/src/CMakeLists.txt index 9b410545..43b0c1fe 100644 --- a/src/games/skyrimse/src/CMakeLists.txt +++ b/src/games/skyrimse/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_skyrimse SHARED) -mo2_configure_plugin(game_skyrimse - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_skyrimse) +mo2_configure_plugin(game_skyrimse) +target_link_libraries(game_skyrimse PRIVATE game_creation) +mo2_install_plugin(game_skyrimse) + diff --git a/src/games/skyrimvr/CMakeLists.txt b/src/games/skyrimvr/CMakeLists.txt index f0819cee..2ac1cb98 100644 --- a/src/games/skyrimvr/CMakeLists.txt +++ b/src/games/skyrimvr/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_skyrimvr) add_subdirectory(src) + diff --git a/src/games/skyrimvr/src/CMakeLists.txt b/src/games/skyrimvr/src/CMakeLists.txt index 4c242e5e..3f2acd90 100644 --- a/src/games/skyrimvr/src/CMakeLists.txt +++ b/src/games/skyrimvr/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_skyrimvr SHARED) -mo2_configure_plugin(game_skyrimvr - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_skyrimvr) +mo2_configure_plugin(game_skyrimvr) +target_link_libraries(game_skyrimvr PRIVATE game_creation) +mo2_install_plugin(game_skyrimvr) + diff --git a/src/games/starfield/CMakeLists.txt b/src/games/starfield/CMakeLists.txt index 2ce9ac19..eefcdc14 100644 --- a/src/games/starfield/CMakeLists.txt +++ b/src/games/starfield/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_starfield) add_subdirectory(src) + diff --git a/src/games/starfield/src/CMakeLists.txt b/src/games/starfield/src/CMakeLists.txt index 2c15f453..a018d93b 100644 --- a/src/games/starfield/src/CMakeLists.txt +++ b/src/games/starfield/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_starfield SHARED) -mo2_configure_plugin(game_starfield - WARNINGS OFF - PRIVATE_DEPENDS creation) -mo2_install_target(game_starfield) +mo2_configure_plugin(game_starfield) +target_link_libraries(game_starfield PRIVATE game_creation) +mo2_install_plugin(game_starfield) + diff --git a/src/games/ttw/CMakeLists.txt b/src/games/ttw/CMakeLists.txt index 274f5bf2..446c7d18 100644 --- a/src/games/ttw/CMakeLists.txt +++ b/src/games/ttw/CMakeLists.txt @@ -1,10 +1,5 @@ cmake_minimum_required(VERSION 3.16) -if(DEFINED DEPENDENCIES_DIR) - include(${DEPENDENCIES_DIR}/modorganizer_super/cmake_common/mo2.cmake) -else() - include(${CMAKE_CURRENT_LIST_DIR}/cmake_common/mo2.cmake) -endif() - project(game_ttw) add_subdirectory(src) + diff --git a/src/games/ttw/src/CMakeLists.txt b/src/games/ttw/src/CMakeLists.txt index 6dda5bec..5d5ee74e 100644 --- a/src/games/ttw/src/CMakeLists.txt +++ b/src/games/ttw/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) add_library(game_ttw SHARED) -mo2_configure_plugin(game_ttw - WARNINGS OFF - PRIVATE_DEPENDS gamebryo) -mo2_install_target(game_ttw) +mo2_configure_plugin(game_ttw) +target_link_libraries(game_ttw PRIVATE game_gamebryo) +mo2_install_plugin(game_ttw) + diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 00000000..cf3a6d88 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,15 @@ +{ + "default-registry": { + "kind": "git", + "repository": "https://github.com/Microsoft/vcpkg", + "baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7" + }, + "registries": [ + { + "kind": "git", + "repository": "https://github.com/ModOrganizer2/vcpkg-registry", + "baseline": "b826771be1e4507f28daffa5f2d8ae0bcfa7bf13", + "packages": ["mo2-*"] + } + ] +} diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..c4a091e2 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["mo2-cmake", "lz4", "zlib"] +}