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
|
submodules: recursive
|
||||||
- name: Setup dependencies
|
- name: Setup dependencies
|
||||||
run: |
|
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
|
- name: Build natsukashii
|
||||||
run: |
|
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
|
cmake --build . --config Release
|
||||||
- name: Collect artifacts
|
- name: Collect artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir upload
|
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
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
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)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
project(imgui)
|
project(imgui)
|
||||||
|
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(Vulkan REQUIRED)
|
||||||
|
find_package(SDL2 CONFIG REQUIRED)
|
||||||
|
|
||||||
add_library(imgui
|
add_library(imgui
|
||||||
imgui/imgui_demo.cpp
|
imgui/imgui_demo.cpp
|
||||||
@@ -17,12 +18,11 @@ add_library(imgui
|
|||||||
imgui/backends/imgui_impl_vulkan.h
|
imgui/backends/imgui_impl_vulkan.h
|
||||||
imgui/backends/imgui_impl_vulkan.cpp)
|
imgui/backends/imgui_impl_vulkan.cpp)
|
||||||
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_compile_options(imgui PUBLIC -mwindows)
|
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS)
|
||||||
set(LIBRARIES -static z stdc++ user32 gdi32 winmm Imm32 ole32 oleaut32 shell32 setupapi version uuid)
|
add_compile_options(/EHa)
|
||||||
else()
|
|
||||||
set(LIBRARIES )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(imgui PUBLIC ${SDL2_INCLUDE_DIRS} imgui imgui/backends)
|
target_include_directories(imgui PUBLIC ${SDL2_INCLUDE_DIR} ${Vulkan_INCLUDE_DIRS} imgui imgui/backends)
|
||||||
target_link_libraries(imgui PUBLIC ${SDL2_LIBRARIES} ${LIBRARIES})
|
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_compile_definitions(parallel-rdp PUBLIC GRANITE_VULKAN_MT)
|
||||||
|
|
||||||
target_include_directories(parallel-rdp PUBLIC
|
target_include_directories(parallel-rdp PUBLIC
|
||||||
${SDL2_INCLUDE_DIRS}
|
${SDL2_INCLUDE_DIR}
|
||||||
|
${Vulkan_INCLUDE_DIR}
|
||||||
parallel-rdp-standalone/parallel-rdp
|
parallel-rdp-standalone/parallel-rdp
|
||||||
parallel-rdp-standalone/volk
|
parallel-rdp-standalone/volk
|
||||||
parallel-rdp-standalone/spirv-cross
|
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)
|
if(WIN32)
|
||||||
target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR)
|
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_SOURCES frontend/*.cpp)
|
||||||
file(GLOB_RECURSE FRONTEND_HEADERS frontend/*.hpp)
|
file(GLOB_RECURSE FRONTEND_HEADERS frontend/*.hpp)
|
||||||
|
|
||||||
|
find_package(fmt REQUIRED)
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
find_package(nlohmann_json 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/capstone capstone)
|
||||||
add_subdirectory(../external/parallel-rdp prdp)
|
add_subdirectory(../external/parallel-rdp prdp)
|
||||||
add_subdirectory(../external/imgui imgui)
|
add_subdirectory(../external/imgui imgui)
|
||||||
@@ -46,21 +44,18 @@ target_include_directories(natsukashii PRIVATE
|
|||||||
../external/parallel-rdp/
|
../external/parallel-rdp/
|
||||||
../external/nativefiledialog-extended/src/include
|
../external/nativefiledialog-extended/src/include
|
||||||
../external/capstone/include
|
../external/capstone/include
|
||||||
../external/fmt/include
|
|
||||||
${SDL2_INCLUDE_DIR}
|
${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(COPY ${PROJECT_SOURCE_DIR}/../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/)
|
||||||
file(REMOVE
|
file(REMOVE
|
||||||
${PROJECT_BINARY_DIR}/resources/mario.png
|
${PROJECT_BINARY_DIR}/resources/mario.png
|
||||||
${PROJECT_BINARY_DIR}/resources/shader.frag
|
${PROJECT_BINARY_DIR}/resources/shader.frag
|
||||||
${PROJECT_BINARY_DIR}/resources/shader.vert)
|
${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)
|
if(WIN32)
|
||||||
target_compile_options(natsukashii PRIVATE -mssse3 -msse4.1)
|
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