Skip to content

Commit

Permalink
Merge pull request #560 from GordonSmith/CMAKE_VCPKG_REFACTOR
Browse files Browse the repository at this point in the history
IDE-1130 Add cmake presets and vcpkg configuration files
  • Loading branch information
GordonSmith authored Feb 16, 2024
2 parents cc2f189 + 017875c commit f0443d2
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 9 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# CMakeLists.txt ---
CMAKE_MINIMUM_REQUIRED(VERSION 3.20)
cmake_minimum_required(VERSION 3.23.0)

set(VCPKG_FILES_DIR "${CMAKE_BINARY_DIR}" CACHE STRING "Folder for vcpkg download, build and installed files")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake)
set(VCPKG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg)
set(VCPKG_OVERLAY_PORTS ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_overlays;${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/overlays)
set(VCPKG_INSTALLED_DIR "${VCPKG_FILES_DIR}/vcpkg_installed")
set(VCPKG_INSTALL_OPTIONS "--downloads-root=${VCPKG_FILES_DIR}/vcpkg_downloads;--x-buildtrees-root=${VCPKG_FILES_DIR}/vcpkg_buildtrees;--x-packages-root=${VCPKG_FILES_DIR}/vcpkg_packages")
set(VCPKG_VERBOSE OFF)

PROJECT(ECLIDE)

Expand Down
90 changes: 90 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"version": 4,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets": [
{
"name": "vcpkg",
"displayName": "vcpkg ",
"toolchainFile": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
"binaryDir": "${sourceDir}/build",
"installDir": "${sourceDir}/build/stage",
"cacheVariables": {
"VCPKG_INSTALLED_DIR": "${sourceDir}/build/vcpkg_installed",
"VCPKG_INSTALL_OPTIONS": "--downloads-root=${sourceDir}/build/vcpkg_downloads;--x-buildtrees-root=${sourceDir}/build/vcpkg_buildtrees;--x-packages-root=${sourceDir}/build/vcpkg_packages"
},
"hidden": true
},
{
"name": "Ninja",
"generator": "Ninja",
"architecture": {
"strategy": "external",
"value": "x86"
},
"hidden": true
},
{
"name": "VS-16",
"generator": "Visual Studio 16 2019",
"architecture": {
"strategy": "set",
"value": "Win32"
},
"hidden": true
},
{
"name": "VS-17",
"generator": "Visual Studio 17 2022",
"architecture": {
"strategy": "set",
"value": "Win32"
},
"hidden": true
},
{
"name": "vcpkg-Ninja",
"inherits": [
"vcpkg",
"Ninja"
]
},
{
"name": "vcpkg-VS-16",
"inherits": [
"vcpkg",
"VS-16"
]
},
{
"name": "vcpkg-VS-17",
"inherits": [
"vcpkg",
"VS-17"
]
}
],
"buildPresets": [
{
"name": "VS-16-Debug",
"configurePreset": "vcpkg-VS-16",
"configuration": "Debug",
"nativeToolOptions": ["-m"]
},
{
"name": "VS-17-Debug",
"configurePreset": "vcpkg-VS-17",
"configuration": "Debug",
"nativeToolOptions": ["-m"]
},
{
"name": "VS-17-RelWithDebInfo",
"configurePreset": "vcpkg-VS-17",
"configuration": "RelWithDebInfo",
"nativeToolOptions": ["-m"]
}
]
}
15 changes: 15 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"default-registry": {
"kind": "builtin",
"baseline": "0d7603c4efc351da97b43c1952ba943e76f9b35f"
},
"registries": [],
"overlay-ports": [
"./vcpkg_overlays",
"./vcpkg/overlays"
],
"overlay-triplets": [
"./vcpkg_overlays",
"./vcpkg/overlays"
]
}
12 changes: 7 additions & 5 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
"name": "hpcc-platform",
"version": "8.12.0",
"name": "eclide",
"version": "9.4",
"dependencies": [
{
"name": "boost-crc",
Expand Down Expand Up @@ -71,7 +71,9 @@
"name": "bugtrap",
"version>=": "1.4.9"
},
"webview2"
],
"builtin-baseline": "0d7603c4efc351da97b43c1952ba943e76f9b35f"
{
"name":"webview2",
"version>=": "1.0.1210.39#1"
}
]
}

0 comments on commit f0443d2

Please sign in to comment.