Skip to content

Commit

Permalink
Merge pull request #5624 from JonBooth78/master
Browse files Browse the repository at this point in the history
Build directly from the CMake configurations on windows with Visual Studio 2019
  • Loading branch information
Webster Sheets authored Sep 8, 2023
2 parents 9f8944e + 07fdbec commit 10e04ca
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pioneer-*.tar.*
*.opensdf
*.o
*.a
*.manifest
/*.exe
/*.dll
/*.pdb
Expand Down
54 changes: 54 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"version": 2,
"configurePresets": [
{
"name": "x64-Debug",
"displayName": "Windows x64 Debug",
"description": "Target Windows with the Visual Studio development environment.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
},
{
"name": "x64-Release",
"displayName": "Windows x64 Release",
"description": "Target Windows with the Visual Studio development environment.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
},
"vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
},
{
"name": "x64-Profiling",
"displayName": "Windows x64 Profiling",
"description": "Target Windows with the Visual Studio development environment.",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"PROFILER_ENABLED": "1"
},
"vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
}
]
}
76 changes: 0 additions & 76 deletions CMakeSettings.json

This file was deleted.

3 changes: 2 additions & 1 deletion COMPILING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ questions are welcome anytime.
in a directory side by side. Don't rename pioneer-thirdparty because the
relative path to it is included in the project files.

2. Open the pioneer solution from /win32/vc2019/pioneer.sln.
2. Open the pioneer folder which should open as a CMake project
see https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-160

3. Build and run the project or solution. Note: the default is to build debug
version, which is what you want if developing, but release gives an executable
Expand Down
2 changes: 1 addition & 1 deletion msvc-defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set(SDL2_IMAGE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/incl
set(SDL2_IMAGE_LIBRARIES ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/SDL2_image.lib)

set(ASSIMP_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/include)
set(ASSIMP_LIBRARIES ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/assimp-vc142-mt.lib)
set(ASSIMP_LIBRARIES optimized ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/assimp-vc142-mt.lib debug ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/assimp-vc142-mtd.lib)

set(VORBISFILE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/include)
set(VORBISFILE_LIBRARIES ${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/ogg.lib;${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/vorbis.lib;${CMAKE_SOURCE_DIR}/../pioneer-thirdparty/win32/lib/${MSVC_ARCH}/vs2019/vorbisfile.lib)
Expand Down

0 comments on commit 10e04ca

Please sign in to comment.