[nostalgia] Fix for Windows

This commit is contained in:
Gary Talent 2022-12-17 13:37:37 -06:00
parent 4077f0bddc
commit d8153e71e1
5 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,9 @@ add_executable(
)
# enable LTO
if(NOT WIN32)
set_property(TARGET nostalgia PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
if(COMMAND OBJCOPY_FILE)
set_target_properties(nostalgia

View File

@ -19,7 +19,7 @@ target_link_libraries(
NostalgiaCore-Studio
)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT WIN32)
# enable LTO
set_property(TARGET nostalgia-studio PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()

View File

@ -31,7 +31,7 @@ constexpr auto ConfigDir = [] {
case ox::OS::OpenBSD:
return "{}/.config/{}";
case ox::OS::Windows:
return "{}/AppData/Local/{}";
return R"({}/AppData/Local/{})";
case ox::OS::BareMetal:
return "";
}

View File

@ -36,7 +36,6 @@ ox::Result<ox::String> saveFile(const ox::Vector<FDFilterItem> &filters) noexcep
for (auto i = 0u; const auto &f : filters) {
filterItems[i].name = f.name.c_str();
filterItems[i].spec = f.spec.c_str();
//filterItems[i] = {f.name.c_str(), f.spec.c_str()};
++i;
}
return toResult(NFD::SaveDialog(path, filterItems.data(), filterItems.size()), path);

View File

@ -6,7 +6,7 @@ target_link_libraries(
NostalgiaPack
)
if (CMAKE_BUILD_TYPE STREQUAL "Release")
if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT WIN32)
# enable LTO
set_property(TARGET nost-pack PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()