Skip to content

Commit

Permalink
Move to VCPKG.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Aug 2, 2024
1 parent 7fc98c5 commit 1be1804
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 62 deletions.
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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(diagnose_basic)

add_subdirectory(src)
52 changes: 52 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"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"
},
{
"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"],
"name": "vs2022-windows",
"toolset": "v143"
}
],
"buildPresets": [
{
"name": "vs2022-windows",
"resolvePackageReferences": "on",
"configurePreset": "vs2022-windows"
}
],
"version": 4
}
40 changes: 0 additions & 40 deletions appveyor.yml

This file was deleted.

9 changes: 7 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.16)

find_package(mo2-cmake CONFIG REQUIRED)
find_package(mo2-uibase CONFIG REQUIRED)
find_package(Boost CONFIG REQUIRED COMPONENTS graph assign)

add_library(diagnose_basic SHARED)
mo2_configure_plugin(diagnose_basic WARNINGS OFF PRIVATE_DEPENDS boost)
mo2_install_target(diagnose_basic)
mo2_configure_plugin(diagnose_basic WARNINGS OFF)
target_link_libraries(diagnose_basic PRIVATE mo2::uibase Boost::assign Boost::graph)
mo2_install_plugin(diagnose_basic)
14 changes: 7 additions & 7 deletions src/diagnosebasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

#include "diagnosebasic.h"

#include "ifiletree.h"
#include "iplugingame.h"
#include <report.h>
#include <utility.h>
#include <imodlist.h>
#include <ipluginlist.h>
#include <imodinterface.h>
#include <uibase/ifiletree.h>
#include <uibase/iplugingame.h>
#include <uibase/report.h>
#include <uibase/utility.h>
#include <uibase/imodlist.h>
#include <uibase/ipluginlist.h>
#include <uibase/imodinterface.h>

#include <QtPlugin>
#include <QFile>
Expand Down
11 changes: 5 additions & 6 deletions src/diagnosebasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,21 @@ along with this plugin. If not, see <http://www.gnu.org/licenses/>.
#ifndef DIAGNOSEBASIC_H
#define DIAGNOSEBASIC_H


#include <iplugin.h>
#include <iplugindiagnose.h>
#include <imoinfo.h>
#include <imodlist.h>
#include <QString>
#include <QSet>
#include <QRegularExpression>

#include <uibase/iplugin.h>
#include <uibase/iplugindiagnose.h>
#include <uibase/imoinfo.h>
#include <uibase/imodlist.h>

class DiagnoseBasic : public QObject, public MOBase::IPlugin, public MOBase::IPluginDiagnose
{
Q_OBJECT
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginDiagnose)
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic" FILE "diagnosebasic.json")
Q_PLUGIN_METADATA(IID "org.tannin.DiagnoseBasic")
#endif

public:
Expand Down
1 change: 0 additions & 1 deletion src/diagnosebasic.json

This file was deleted.

21 changes: 21 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7"
},
"registries": [
{
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "f61a294e765b257926ae9e9d85f96468a0af74e7",
"packages": ["boost*", "boost-*"]
},
{
"kind": "git",
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
"baseline": "b826771be1e4507f28daffa5f2d8ae0bcfa7bf13",
"packages": ["mo2-*"]
}
]
}
3 changes: 3 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dependencies": ["mo2-cmake", "boost-assign", "boost-graph"]
}

0 comments on commit 1be1804

Please sign in to comment.