-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for vcpkg Adds support for dynamic linkage (BUILD_SHARED_LIBS=ON) Use alias targets when linking in cmake to avoid typos. Use find_package and target_link_libraries for all dependencies, also header only dependencies.
- Loading branch information
1 parent
2f82990
commit c3bdfcf
Showing
97 changed files
with
771 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build sgct | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
env: | ||
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
ext: ["submodule" ,"vcpkg"] | ||
linkage: ["static", "dynamic"] | ||
tracy: ["-tracy", ""] | ||
fail-fast: false | ||
|
||
runs-on: windows-latest | ||
timeout-minutes: 360 | ||
|
||
steps: | ||
- name: Clone VCPKG | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'microsoft/vcpkg' | ||
fetch-depth: 0 | ||
path: 'vcpkg' | ||
|
||
# Cache built dependencies for faster subsequent builds | ||
- name: 'Setup NuGet Credentials' | ||
shell: bash | ||
run: > | ||
`vcpkg fetch nuget | tail -n 1` | ||
sources add | ||
-source "https://nuget.pkg.github.com/inviwo/index.json" | ||
-storepasswordincleartext | ||
-name "GitHub" | ||
-username "inviwo" | ||
-password "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Setup C++ Log matchers | ||
uses: Trass3r/setup-cpp@v1 | ||
|
||
- name: Clone | ||
uses: actions/checkout@v3 | ||
with: | ||
path: sgct | ||
submodules: recursive | ||
|
||
- name: Configure | ||
shell: bash | ||
run: > | ||
cmake -S sgct -B build --preset msvc-${{ matrix.ext }}-${{ matrix.linkage }}${{ matrix.tracy }} | ||
-DCMAKE_BUILD_TYPE=Release | ||
- name: Build | ||
timeout-minutes: 360 | ||
shell: bash | ||
run: cmake --build build --config Release --parallel | ||
|
||
- name: Test | ||
if: matrix.tracy == '' | ||
timeout-minutes: 360 | ||
shell: bash | ||
run: ctest --test-dir build --build-config Release --output-on-failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"version": 3, | ||
"cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 }, | ||
"configurePresets": [ | ||
{ | ||
"name": "tracy", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"SGCT_ENABLE_EDIT_CONTINUE": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_TRACY_SUPPORT": { "type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "vcpkg", | ||
"hidden": true, | ||
"toolchainFile": "${sourceParentDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"cacheVariables": { | ||
"CMAKE_TOOLCHAIN_FILE" : "${sourceParentDir}/vcpkg/scripts/buildsystems/vcpkg.cmake", | ||
"SGCT_DEP_INCLUDE_CATCH2": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_FMT": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_FREETYPE": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_GLAD": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_GLFW": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_GLM": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_JSON": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_LIBPNG": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_OPENVR": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_SCN": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_STB": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_TINYXML": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_TRACY": { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_DEP_INCLUDE_ZLIB": { "type": "BOOL", "value": "OFF"} | ||
} | ||
}, | ||
{ | ||
"name": "msvc", | ||
"displayName": "MSVC 2022", | ||
"generator": "Visual Studio 17 2022", | ||
"architecture": "x64" | ||
}, | ||
{ | ||
"name": "msvc-submodule-static", | ||
"displayName": "MSVC 2022 Using submodules, static linking", | ||
"inherits": ["msvc"], | ||
"cacheVariables": { | ||
"BUILD_SHARED_LIBS" : { "type": "BOOL", "value": "OFF"}, | ||
"SGCT_FREETYPE_SUPPORT" : { "type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "msvc-submodule-static-tracy", | ||
"displayName": "MSVC 2022 Using submodules, static linking, tracy enabled", | ||
"inherits": ["msvc", "tracy"] | ||
}, | ||
{ | ||
"name": "msvc-submodule-dynamic", | ||
"displayName": "MSVC 2022 Using submodules, dynamic linking", | ||
"inherits": ["msvc"], | ||
"cacheVariables": { | ||
"BUILD_SHARED_LIBS" : { "type": "BOOL", "value": "ON"}, | ||
"SGCT_FREETYPE_SUPPORT" : { "type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "msvc-submodule-dynamic-tracy", | ||
"displayName": "MSVC 2022 Using submodules, dynamic linking, tracy enabled", | ||
"inherits": ["msvc", "tracy"] | ||
}, | ||
{ | ||
"name": "msvc-vcpkg-static", | ||
"displayName": "MSVC 2022 Using vcpkg, static linking", | ||
"inherits": ["vcpkg", "msvc"], | ||
"cacheVariables": { | ||
"VCPKG_TARGET_TRIPLET" : "x64-windows-static-md", | ||
"BUILD_SHARED_LIBS" : { "type": "BOOL", "value": "OFF"}, | ||
"VCPKG_MANIFEST_FEATURES" : "freetype", | ||
"SGCT_FREETYPE_SUPPORT" : { "type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "msvc-vcpkg-static-tracy", | ||
"displayName": "MSVC 2022 Using vcpkg, static linking, tracy enabled", | ||
"inherits": ["vcpkg", "msvc", "tracy"], | ||
"cacheVariables": { | ||
"VCPKG_MANIFEST_FEATURES" : "freetype;tracy" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-vcpkg-dynamic", | ||
"displayName": "MSVC 2022 Using vcpkg, dynamic linking", | ||
"inherits": ["vcpkg", "msvc"], | ||
"cacheVariables": { | ||
"VCPKG_TARGET_TRIPLET" : "x64-windows", | ||
"BUILD_SHARED_LIBS" : { "type": "BOOL", "value": "ON"}, | ||
"VCPKG_MANIFEST_FEATURES" : "freetype", | ||
"SGCT_FREETYPE_SUPPORT" : { "type": "BOOL", "value": "ON"} | ||
} | ||
}, | ||
{ | ||
"name": "msvc-vcpkg-dynamic-tracy", | ||
"displayName": "MSVC 2022 Using vcpkg, dynamic linking, tracy enabled", | ||
"inherits": ["vcpkg", "msvc", "tracy"], | ||
"cacheVariables": { | ||
"VCPKG_MANIFEST_FEATURES" : "freetype;tracy" | ||
} | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.