attempting to fix Windows build once again
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -41,15 +41,18 @@ jobs:
|
||||
submodules: recursive
|
||||
- name: Setup dependencies
|
||||
run: |
|
||||
vcpkg install sdl2[vulkan]:x64-windows-static
|
||||
vcpkg install sdl2[vulkan]:x64-windows
|
||||
vcpkg install fmt:x64-windows
|
||||
vcpkg install nlohmann-json:x64-windows
|
||||
vcpkg install vulkan:x64-windows
|
||||
- name: Build natsukashii
|
||||
run: |
|
||||
cmake -B build -T clangcl -DCAPSTONE_ARCHITECTURE_DEFAULT=OFF -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_MIPS_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -S src
|
||||
cmake -B build -T clangcl -DCAPSTONE_ARCHITECTURE_DEFAULT=OFF -DCAPSTONE_BUILD_TESTS=OFF -DCAPSTONE_MIPS_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -S src
|
||||
cmake --build . --config Release
|
||||
- name: Collect artifacts
|
||||
run: |
|
||||
mkdir upload
|
||||
cp -r build/{natsukashii.exe,resources,SDL2.dll} upload
|
||||
cp -r build/{natsukashii.exe,resources,SDL2.dll,fmt.dll} upload
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
||||
1
external/fmt
vendored
1
external/fmt
vendored
Submodule external/fmt deleted from 80f8d34427
14
external/imgui/CMakeLists.txt
vendored
14
external/imgui/CMakeLists.txt
vendored
@@ -1,7 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(imgui)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(Vulkan REQUIRED)
|
||||
find_package(SDL2 CONFIG REQUIRED)
|
||||
|
||||
add_library(imgui
|
||||
imgui/imgui_demo.cpp
|
||||
@@ -17,12 +18,11 @@ add_library(imgui
|
||||
imgui/backends/imgui_impl_vulkan.h
|
||||
imgui/backends/imgui_impl_vulkan.cpp)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
target_compile_options(imgui PUBLIC -mwindows)
|
||||
set(LIBRARIES -static z stdc++ user32 gdi32 winmm Imm32 ole32 oleaut32 shell32 setupapi version uuid)
|
||||
else()
|
||||
set(LIBRARIES )
|
||||
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||
add_compile_options(/EHa)
|
||||
endif()
|
||||
|
||||
target_include_directories(imgui PUBLIC ${SDL2_INCLUDE_DIRS} imgui imgui/backends)
|
||||
target_link_libraries(imgui PUBLIC ${SDL2_LIBRARIES} ${LIBRARIES})
|
||||
target_include_directories(imgui PUBLIC ${SDL2_INCLUDE_DIR} ${Vulkan_INCLUDE_DIRS} imgui imgui/backends)
|
||||
target_link_libraries(imgui PUBLIC SDL2::SDL2main SDL2::SDL2 Vulkan::Vulkan)
|
||||
2
external/nativefiledialog-extended
vendored
2
external/nativefiledialog-extended
vendored
Submodule external/nativefiledialog-extended updated: 31df8e30cc...74923e7c0c
10
external/parallel-rdp/CMakeLists.txt
vendored
10
external/parallel-rdp/CMakeLists.txt
vendored
@@ -52,7 +52,8 @@ add_library(parallel-rdp
|
||||
target_compile_definitions(parallel-rdp PUBLIC GRANITE_VULKAN_MT)
|
||||
|
||||
target_include_directories(parallel-rdp PUBLIC
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
${SDL2_INCLUDE_DIR}
|
||||
${Vulkan_INCLUDE_DIR}
|
||||
parallel-rdp-standalone/parallel-rdp
|
||||
parallel-rdp-standalone/volk
|
||||
parallel-rdp-standalone/spirv-cross
|
||||
@@ -78,7 +79,12 @@ target_include_directories(parallel-rdp PUBLIC
|
||||
.
|
||||
)
|
||||
|
||||
target_link_libraries(parallel-rdp SDL2::SDL2main SDL2::SDL2-static)
|
||||
if(WIN32)
|
||||
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||
add_compile_options(/EHa)
|
||||
endif()
|
||||
|
||||
target_link_libraries(parallel-rdp Vulkan::Vulkan SDL2::SDL2main SDL2::SDL2)
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR)
|
||||
|
||||
@@ -9,12 +9,10 @@ file(GLOB_RECURSE CORE_HEADERS n64/*.hpp)
|
||||
file(GLOB_RECURSE FRONTEND_SOURCES frontend/*.cpp)
|
||||
file(GLOB_RECURSE FRONTEND_HEADERS frontend/*.hpp)
|
||||
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
|
||||
set(FMT_TEST BOOL "" FORCE OFF)
|
||||
|
||||
add_subdirectory(../external/fmt fmt)
|
||||
add_subdirectory(../external/capstone capstone)
|
||||
add_subdirectory(../external/parallel-rdp prdp)
|
||||
add_subdirectory(../external/imgui imgui)
|
||||
@@ -46,21 +44,18 @@ target_include_directories(natsukashii PRIVATE
|
||||
../external/parallel-rdp/
|
||||
../external/nativefiledialog-extended/src/include
|
||||
../external/capstone/include
|
||||
../external/fmt/include
|
||||
${SDL2_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(${CMAKE_BUILD_TYPE} MATCHES Release)
|
||||
target_compile_options(natsukashii PRIVATE -Ofast)
|
||||
elseif(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
target_compile_options(natsukashii PRIVATE -g)
|
||||
endif()
|
||||
|
||||
file(COPY ${PROJECT_SOURCE_DIR}/../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/)
|
||||
file(REMOVE
|
||||
${PROJECT_BINARY_DIR}/resources/mario.png
|
||||
${PROJECT_BINARY_DIR}/resources/shader.frag
|
||||
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
||||
|
||||
target_link_libraries(natsukashii PRIVATE SDL2::SDL2main SDL2::SDL2-static capstone-static nfd parallel-rdp imgui fmt::fmt nlohmann_json::nlohmann_json)
|
||||
target_compile_options(natsukashii PRIVATE -mssse3 -msse4.1)
|
||||
if(WIN32)
|
||||
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||
add_compile_options(/EHa)
|
||||
endif()
|
||||
|
||||
target_link_libraries(natsukashii PRIVATE SDL2::SDL2main SDL2::SDL2 capstone-static nfd parallel-rdp fmt::fmt imgui nlohmann_json::nlohmann_json)
|
||||
Reference in New Issue
Block a user