-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3541af
commit 19dfe89
Showing
7 changed files
with
1,242 additions
and
108 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 |
---|---|---|
|
@@ -6,9 +6,6 @@ on: | |
types: completed | ||
workflow_dispatch: | ||
|
||
env: | ||
VCPKG_COMMIT_ID: e44d60e6bf0964064bf69667cd9f3e91dc383c7c | ||
|
||
jobs: | ||
test-build: | ||
runs-on: windows-latest | ||
|
@@ -18,20 +15,23 @@ jobs: | |
preset: | ||
- debug | ||
- release | ||
compiler: | ||
- msvc | ||
- clang-cl | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get CMake | ||
uses: lukka/get-cmake@latest | ||
|
||
- name: Setup vcpkg | ||
uses: lukka/[email protected] | ||
- name: Setup MSVC prompt | ||
uses: TheMrMilchmann/setup-msvc-dev@v3 | ||
with: | ||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT_ID }} | ||
arch: x64 | ||
toolset: 14.38 | ||
|
||
- name: Run CMake | ||
uses: lukka/[email protected] | ||
with: | ||
configurePreset: build-${{ matrix.preset }}-msvc | ||
buildPreset: ${{ matrix.preset }}-msvc | ||
- name: Build | ||
run: | | ||
cmake -B ./build --preset=build-${{ matrix.preset }}-${{ matrix.compiler }} | ||
cmake --build ./build --preset=${{ matrix.preset }}-${{ matrix.compiler }} |
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.27) | ||
message("Using toolchain file ${CMAKE_TOOLCHAIN_FILE}.") | ||
|
||
######################################################################################################################## | ||
## Define project | ||
|
@@ -17,6 +16,13 @@ set(CMAKE_OPTIMIZE_DEPENDENCIES ON) | |
|
||
include(GNUInstallDirs) | ||
|
||
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake") | ||
|
||
CPMAddPackage("gh:Starfield-Reverse-Engineering/CommonLibSF#main") | ||
CPMAddPackage("gh:brofield/[email protected]") | ||
|
||
include("${CommonLibSF_SOURCE_DIR}/CommonLibSF/cmake/CommonLibSF.cmake") | ||
|
||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in | ||
${CMAKE_CURRENT_BINARY_DIR}/version.rc | ||
|
@@ -47,8 +53,6 @@ source_group( | |
######################################################################################################################## | ||
## Configure target DLL | ||
######################################################################################################################## | ||
find_package(CommonLibSF CONFIG REQUIRED) | ||
|
||
add_commonlibsf_plugin( | ||
${PROJECT_NAME} | ||
AUTHOR AuthorName | ||
|
@@ -57,15 +61,13 @@ add_commonlibsf_plugin( | |
|
||
add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}") | ||
|
||
find_path(SIMPLEINI_INCLUDE_DIRS "SimpleIni.h") | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} | ||
PRIVATE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/src> | ||
$<INSTALL_INTERFACE:src> | ||
${SIMPLEINI_INCLUDE_DIRS} | ||
${SimpleIni_SOURCE_DIR} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
) | ||
|
@@ -74,7 +76,7 @@ target_precompile_headers( | |
${PROJECT_NAME} | ||
PRIVATE | ||
include/PCH.h | ||
${SIMPLEINI_INCLUDE_DIRS}/SimpleIni.h | ||
${SimpleIni_SOURCE_DIR}/SimpleIni.h | ||
) | ||
|
||
install( | ||
|
@@ -132,3 +134,7 @@ set_property( | |
TARGET ${PROJECT_NAME} | ||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${OUTPUT_PDBS}" | ||
) | ||
set_property( | ||
TARGET ${PROJECT_NAME} | ||
APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/build/.cpm" | ||
) |
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.