-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
69 lines (60 loc) · 2.55 KB
/
premake5.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
workspace "ImGuiBorderlessWindow"
configurations { "Debug", "Release" }
architecture "x64"
cppdialect "C++20"
location "solution"
project "ImGuiBorderlessWindow"
kind "WindowedApp"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
objdir "bin-int/%{cfg.buildcfg}"
debugdir "bin/%{cfg.buildcfg}"
files { "**.h", "**.cpp" }
includedirs { "ImGuiBorderlessWindow/Gui/ThirdParty/ImGui", "ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends" }
removefiles {
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/misc/**",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/examples/**",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/**",
"ImGuiBorderlessWindow/Gui/Platform/**/**" -- Exclude everything in any sub-folder of Platform, keep Platform.h and Platform.cpp
}
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "RELEASE" }
optimize "On"
filter "system:windows"
defines { "PLATFORM_WINDOWS "}
links { "d3d9" }
files { "ImGuiBorderlessWindow/Gui/Platform/Windows/**" }
files {
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_dx9.h",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_win32.h",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_dx9.cpp",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_win32.cpp"
}
postbuildcommands {
"{COPYDIR} ../ImGuiBorderlessWindow/Assets %{cfg.targetdir}/Assets"
}
filter "system:macosx"
defines { "PLATFORM_MAC "}
links {
"Cocoa.framework",
"GameController.framework",
"Metal.framework",
"MetalKit.framework"
}
files { "ImGuiBorderlessWindow/Gui/Platform/Mac/**" }
files {
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_metal.h",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_osx.h",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_metal.mm",
"ImGuiBorderlessWindow/Gui/ThirdParty/ImGui/backends/imgui_impl_osx.mm"
}
prebuildcommands {
"mkdir -p ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/Assets",
"cp -rf ../ImGuiBorderlessWindow/Assets/* ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Resources/Assets/"
}
xcodebuildsettings {
["INFOPLIST_FILE"] = "$(SRCROOT)/../ImGuiBorderlessWindow/Gui/Platform/Mac/Info-macOS.plist"
}