diff --git a/flake.nix b/flake.nix index e041736..9989c4c 100644 --- a/flake.nix +++ b/flake.nix @@ -145,6 +145,8 @@ ] ++ deps; + INCLUDE_DIR = "${llvmPackages_18.libcxx.dev}/include/c++/v1"; + name = "C++"; }; } diff --git a/src/util/types.h b/src/util/types.h index e03d326..3bad7d4 100644 --- a/src/util/types.h +++ b/src/util/types.h @@ -124,4 +124,3 @@ using isize = std::ptrdiff_t; * @brief Represents a string. */ using string = std::string; - diff --git a/xmake.lua b/xmake.lua index a62d8e3..824b971 100644 --- a/xmake.lua +++ b/xmake.lua @@ -3,7 +3,7 @@ add_requires("fmt", "libcurl", "tomlplusplus", "yyjson") if os.host() == "macosx" then - add_requires("Foundation", "MediaPlayer", "SystemConfiguration", "iconv") + add_requires("iconv") elseif os.host() == "linux" or os.host() == "bsd" then add_requires("sdbus-c++", "x11") end @@ -23,6 +23,8 @@ add_cxxflags( ) if os.host() == "macosx" then + add_includedirs("$(env INCLUDE_DIR)") + add_mxxflags( "-Wno-c++20-compat", "-Wno-c++20-extensions", @@ -64,7 +66,8 @@ end add_packages("fmt", "libcurl", "tomlplusplus", "yyjson") if os.host() == "macosx" then - add_packages("Foundation", "MediaPlayer", "SystemConfiguration", "iconv") + add_frameworks("Foundation", "MediaPlayer", "SystemConfiguration") + add_packages("iconv") elseif os.host() == "linux" or os.host() == "bsd" then add_packages("sdbus-c++", "x11") end