-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Non-breaking, adds CPM as an alternative to vcpkg via additional build presets. Closes #189
- Loading branch information
1 parent
70a77d3
commit d2dd993
Showing
10 changed files
with
1,344 additions
and
53 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 |
---|---|---|
|
@@ -36,7 +36,7 @@ jobs: | |
uses: lukka/[email protected] | ||
with: | ||
cmakeListsTxtPath: "${{ github.workspace }}/CommonLibSF/CMakeLists.txt" | ||
configurePreset: build-release-${{ matrix.compiler }}-ninja | ||
configurePreset: build-release-${{ matrix.compiler }}-ninja-vcpkg | ||
configurePresetCmdString: "[`-B`, `$[env.GITHUB_WORKSPACE]/build`, `-S`, `$[env.GITHUB_WORKSPACE]/CommonLibSF`, `--preset`, `$[env.CONFIGURE_PRESET_NAME]`]" | ||
buildPreset: release-${{ matrix.compiler }}-ninja | ||
buildPreset: release-${{ matrix.compiler }}-ninja-vcpkg | ||
buildPresetCmdString: "[`--build`, `$[env.GITHUB_WORKSPACE]/build`, `--preset`, `$[env.BUILD_PRESET_NAME]`]" |
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 |
---|---|---|
|
@@ -33,9 +33,9 @@ jobs: | |
uses: lukka/[email protected] | ||
with: | ||
cmakeListsTxtPath: "${{ github.workspace }}/CommonLibSF/CMakeLists.txt" | ||
configurePreset: build-debug-msvc-ninja | ||
configurePreset: build-debug-msvc-ninja-vcpkg | ||
configurePresetCmdString: "[`-B`, `$[env.GITHUB_WORKSPACE]/build`, `-S`, `$[env.GITHUB_WORKSPACE]/CommonLibSF`, `--preset`, `$[env.CONFIGURE_PRESET_NAME]`]" | ||
buildPreset: debug-msvc-ninja | ||
buildPreset: debug-msvc-ninja-vcpkg | ||
buildPresetCmdString: "[`--build`, `$[env.GITHUB_WORKSPACE]/build`, `--preset`, `$[env.BUILD_PRESET_NAME]`]" | ||
|
||
- name: Find PDB | ||
|
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 |
---|---|---|
|
@@ -32,7 +32,17 @@ if(${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR}) | |
endif() | ||
|
||
# dependencies | ||
find_package(spdlog CONFIG REQUIRED) | ||
if(USING_VCPKG) | ||
find_package(spdlog CONFIG REQUIRED) | ||
else() | ||
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake") | ||
|
||
CPMAddPackage( | ||
GITHUB_REPOSITORY gabime/spdlog | ||
VERSION 1.12.0 | ||
OPTIONS "SPDLOG_USE_STD_FORMAT ON" | ||
) | ||
endif() | ||
|
||
# source files | ||
execute_process( | ||
|
@@ -125,13 +135,17 @@ target_link_libraries( | |
) | ||
|
||
if(SFSE_SUPPORT_XBYAK) | ||
find_package(xbyak CONFIG REQUIRED) | ||
if(USING_VCPKG) | ||
find_package(xbyak CONFIG REQUIRED) | ||
else() | ||
CPMAddPackage("gh:herumi/[email protected]") | ||
endif() | ||
|
||
target_link_libraries( | ||
${PROJECT_NAME} | ||
PUBLIC | ||
xbyak::xbyak | ||
) | ||
target_link_libraries( | ||
${PROJECT_NAME} | ||
PUBLIC | ||
xbyak::xbyak | ||
) | ||
endif() | ||
|
||
target_precompile_headers( | ||
|
@@ -140,10 +154,17 @@ target_precompile_headers( | |
include/SFSE/Impl/PCH.h | ||
) | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}-targets | ||
) | ||
if(USING_VCPKG) | ||
install( | ||
TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}-targets | ||
) | ||
else() | ||
install( | ||
TARGETS ${PROJECT_NAME} spdlog | ||
EXPORT ${PROJECT_NAME}-targets | ||
) | ||
endif() | ||
|
||
install( | ||
EXPORT ${PROJECT_NAME}-targets | ||
|
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.